repo_id
stringlengths
21
96
file_path
stringlengths
31
155
content
stringlengths
1
92.9M
__index_level_0__
int64
0
0
rapidsai_public_repos/roc/vendor/github.com/mattn
rapidsai_public_repos/roc/vendor/github.com/mattn/go-isatty/README.md
# go-isatty [![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) [![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty) [![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) [![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) isatty for golang ## Usage ```go package main import ( "fmt" "github.com/mattn/go-isatty" "os" ) func main() { if isatty.IsTerminal(os.Stdout.Fd()) { fmt.Println("Is Terminal") } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { fmt.Println("Is Cygwin/MSYS2 Terminal") } else { fmt.Println("Is Not Terminal") } } ``` ## Installation ``` $ go get github.com/mattn/go-isatty ``` ## License MIT ## Author Yasuhiro Matsumoto (a.k.a mattn) ## Thanks * k-takata: base idea for IsCygwinTerminal https://github.com/k-takata/go-iscygpty
0
rapidsai_public_repos/roc/vendor/github.com/mattn
rapidsai_public_repos/roc/vendor/github.com/mattn/go-isatty/isatty_others.go
//go:build appengine || js || nacl || wasm // +build appengine js nacl wasm package isatty // IsTerminal returns true if the file descriptor is terminal which // is always false on js and appengine classic which is a sandboxed PaaS. func IsTerminal(fd uintptr) bool { return false } // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 // terminal. This is also always false on this environment. func IsCygwinTerminal(fd uintptr) bool { return false }
0
rapidsai_public_repos/roc/vendor/github.com/mattn
rapidsai_public_repos/roc/vendor/github.com/mattn/go-isatty/doc.go
// Package isatty implements interface to isatty package isatty
0
rapidsai_public_repos/roc/vendor/github.com/mattn
rapidsai_public_repos/roc/vendor/github.com/mattn/go-isatty/LICENSE
Copyright (c) Yasuhiro MATSUMOTO <[email protected]> MIT License (Expat) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0
rapidsai_public_repos/roc/vendor/github.com/mattn
rapidsai_public_repos/roc/vendor/github.com/mattn/go-isatty/go.test.sh
#!/usr/bin/env bash set -e echo "" > coverage.txt for d in $(go list ./... | grep -v vendor); do go test -race -coverprofile=profile.out -covermode=atomic "$d" if [ -f profile.out ]; then cat profile.out >> coverage.txt rm profile.out fi done
0
rapidsai_public_repos/roc/vendor/github.com/mattn
rapidsai_public_repos/roc/vendor/github.com/mattn/go-isatty/isatty_plan9.go
//go:build plan9 // +build plan9 package isatty import ( "syscall" ) // IsTerminal returns true if the given file descriptor is a terminal. func IsTerminal(fd uintptr) bool { path, err := syscall.Fd2path(int(fd)) if err != nil { return false } return path == "/dev/cons" || path == "/mnt/term/dev/cons" } // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 // terminal. This is also always false on this environment. func IsCygwinTerminal(fd uintptr) bool { return false }
0
rapidsai_public_repos/roc/vendor/github.com/fatih
rapidsai_public_repos/roc/vendor/github.com/fatih/color/color.go
package color import ( "fmt" "io" "os" "strconv" "strings" "sync" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" ) var ( // NoColor defines if the output is colorized or not. It's dynamically set to // false or true based on the stdout's file descriptor referring to a terminal // or not. It's also set to true if the NO_COLOR environment variable is // set (regardless of its value). This is a global option and affects all // colors. For more control over each color block use the methods // DisableColor() individually. NoColor = noColorExists() || os.Getenv("TERM") == "dumb" || (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) // Output defines the standard output of the print functions. By default // os.Stdout is used. Output = colorable.NewColorableStdout() // Error defines a color supporting writer for os.Stderr. Error = colorable.NewColorableStderr() // colorsCache is used to reduce the count of created Color objects and // allows to reuse already created objects with required Attribute. colorsCache = make(map[Attribute]*Color) colorsCacheMu sync.Mutex // protects colorsCache ) // noColorExists returns true if the environment variable NO_COLOR exists. func noColorExists() bool { _, exists := os.LookupEnv("NO_COLOR") return exists } // Color defines a custom color object which is defined by SGR parameters. type Color struct { params []Attribute noColor *bool } // Attribute defines a single SGR Code type Attribute int const escape = "\x1b" // Base attributes const ( Reset Attribute = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut ) // Foreground text colors const ( FgBlack Attribute = iota + 30 FgRed FgGreen FgYellow FgBlue FgMagenta FgCyan FgWhite ) // Foreground Hi-Intensity text colors const ( FgHiBlack Attribute = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite ) // Background text colors const ( BgBlack Attribute = iota + 40 BgRed BgGreen BgYellow BgBlue BgMagenta BgCyan BgWhite ) // Background Hi-Intensity text colors const ( BgHiBlack Attribute = iota + 100 BgHiRed BgHiGreen BgHiYellow BgHiBlue BgHiMagenta BgHiCyan BgHiWhite ) // New returns a newly created color object. func New(value ...Attribute) *Color { c := &Color{ params: make([]Attribute, 0), } if noColorExists() { c.noColor = boolPtr(true) } c.Add(value...) return c } // Set sets the given parameters immediately. It will change the color of // output with the given SGR parameters until color.Unset() is called. func Set(p ...Attribute) *Color { c := New(p...) c.Set() return c } // Unset resets all escape attributes and clears the output. Usually should // be called after Set(). func Unset() { if NoColor { return } fmt.Fprintf(Output, "%s[%dm", escape, Reset) } // Set sets the SGR sequence. func (c *Color) Set() *Color { if c.isNoColorSet() { return c } fmt.Fprintf(Output, c.format()) return c } func (c *Color) unset() { if c.isNoColorSet() { return } Unset() } func (c *Color) setWriter(w io.Writer) *Color { if c.isNoColorSet() { return c } fmt.Fprintf(w, c.format()) return c } func (c *Color) unsetWriter(w io.Writer) { if c.isNoColorSet() { return } if NoColor { return } fmt.Fprintf(w, "%s[%dm", escape, Reset) } // Add is used to chain SGR parameters. Use as many as parameters to combine // and create custom color objects. Example: Add(color.FgRed, color.Underline). func (c *Color) Add(value ...Attribute) *Color { c.params = append(c.params, value...) return c } func (c *Color) prepend(value Attribute) { c.params = append(c.params, 0) copy(c.params[1:], c.params[0:]) c.params[0] = value } // Fprint formats using the default formats for its operands and writes to w. // Spaces are added between operands when neither is a string. // It returns the number of bytes written and any write error encountered. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { c.setWriter(w) defer c.unsetWriter(w) return fmt.Fprint(w, a...) } // Print formats using the default formats for its operands and writes to // standard output. Spaces are added between operands when neither is a // string. It returns the number of bytes written and any write error // encountered. This is the standard fmt.Print() method wrapped with the given // color. func (c *Color) Print(a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprint(Output, a...) } // Fprintf formats according to a format specifier and writes to w. // It returns the number of bytes written and any write error encountered. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { c.setWriter(w) defer c.unsetWriter(w) return fmt.Fprintf(w, format, a...) } // Printf formats according to a format specifier and writes to standard output. // It returns the number of bytes written and any write error encountered. // This is the standard fmt.Printf() method wrapped with the given color. func (c *Color) Printf(format string, a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprintf(Output, format, a...) } // Fprintln formats using the default formats for its operands and writes to w. // Spaces are always added between operands and a newline is appended. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { c.setWriter(w) defer c.unsetWriter(w) return fmt.Fprintln(w, a...) } // Println formats using the default formats for its operands and writes to // standard output. Spaces are always added between operands and a newline is // appended. It returns the number of bytes written and any write error // encountered. This is the standard fmt.Print() method wrapped with the given // color. func (c *Color) Println(a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprintln(Output, a...) } // Sprint is just like Print, but returns a string instead of printing it. func (c *Color) Sprint(a ...interface{}) string { return c.wrap(fmt.Sprint(a...)) } // Sprintln is just like Println, but returns a string instead of printing it. func (c *Color) Sprintln(a ...interface{}) string { return c.wrap(fmt.Sprintln(a...)) } // Sprintf is just like Printf, but returns a string instead of printing it. func (c *Color) Sprintf(format string, a ...interface{}) string { return c.wrap(fmt.Sprintf(format, a...)) } // FprintFunc returns a new function that prints the passed arguments as // colorized with color.Fprint(). func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) { return func(w io.Writer, a ...interface{}) { c.Fprint(w, a...) } } // PrintFunc returns a new function that prints the passed arguments as // colorized with color.Print(). func (c *Color) PrintFunc() func(a ...interface{}) { return func(a ...interface{}) { c.Print(a...) } } // FprintfFunc returns a new function that prints the passed arguments as // colorized with color.Fprintf(). func (c *Color) FprintfFunc() func(w io.Writer, format string, a ...interface{}) { return func(w io.Writer, format string, a ...interface{}) { c.Fprintf(w, format, a...) } } // PrintfFunc returns a new function that prints the passed arguments as // colorized with color.Printf(). func (c *Color) PrintfFunc() func(format string, a ...interface{}) { return func(format string, a ...interface{}) { c.Printf(format, a...) } } // FprintlnFunc returns a new function that prints the passed arguments as // colorized with color.Fprintln(). func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) { return func(w io.Writer, a ...interface{}) { c.Fprintln(w, a...) } } // PrintlnFunc returns a new function that prints the passed arguments as // colorized with color.Println(). func (c *Color) PrintlnFunc() func(a ...interface{}) { return func(a ...interface{}) { c.Println(a...) } } // SprintFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprint(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output, example: // // put := New(FgYellow).SprintFunc() // fmt.Fprintf(color.Output, "This is a %s", put("warning")) func (c *Color) SprintFunc() func(a ...interface{}) string { return func(a ...interface{}) string { return c.wrap(fmt.Sprint(a...)) } } // SprintfFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprintf(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output. func (c *Color) SprintfFunc() func(format string, a ...interface{}) string { return func(format string, a ...interface{}) string { return c.wrap(fmt.Sprintf(format, a...)) } } // SprintlnFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprintln(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output. func (c *Color) SprintlnFunc() func(a ...interface{}) string { return func(a ...interface{}) string { return c.wrap(fmt.Sprintln(a...)) } } // sequence returns a formatted SGR sequence to be plugged into a "\x1b[...m" // an example output might be: "1;36" -> bold cyan func (c *Color) sequence() string { format := make([]string, len(c.params)) for i, v := range c.params { format[i] = strconv.Itoa(int(v)) } return strings.Join(format, ";") } // wrap wraps the s string with the colors attributes. The string is ready to // be printed. func (c *Color) wrap(s string) string { if c.isNoColorSet() { return s } return c.format() + s + c.unformat() } func (c *Color) format() string { return fmt.Sprintf("%s[%sm", escape, c.sequence()) } func (c *Color) unformat() string { return fmt.Sprintf("%s[%dm", escape, Reset) } // DisableColor disables the color output. Useful to not change any existing // code and still being able to output. Can be used for flags like // "--no-color". To enable back use EnableColor() method. func (c *Color) DisableColor() { c.noColor = boolPtr(true) } // EnableColor enables the color output. Use it in conjunction with // DisableColor(). Otherwise this method has no side effects. func (c *Color) EnableColor() { c.noColor = boolPtr(false) } func (c *Color) isNoColorSet() bool { // check first if we have user set action if c.noColor != nil { return *c.noColor } // if not return the global option, which is disabled by default return NoColor } // Equals returns a boolean value indicating whether two colors are equal. func (c *Color) Equals(c2 *Color) bool { if len(c.params) != len(c2.params) { return false } for _, attr := range c.params { if !c2.attrExists(attr) { return false } } return true } func (c *Color) attrExists(a Attribute) bool { for _, attr := range c.params { if attr == a { return true } } return false } func boolPtr(v bool) *bool { return &v } func getCachedColor(p Attribute) *Color { colorsCacheMu.Lock() defer colorsCacheMu.Unlock() c, ok := colorsCache[p] if !ok { c = New(p) colorsCache[p] = c } return c } func colorPrint(format string, p Attribute, a ...interface{}) { c := getCachedColor(p) if !strings.HasSuffix(format, "\n") { format += "\n" } if len(a) == 0 { c.Print(format) } else { c.Printf(format, a...) } } func colorString(format string, p Attribute, a ...interface{}) string { c := getCachedColor(p) if len(a) == 0 { return c.SprintFunc()(format) } return c.SprintfFunc()(format, a...) } // Black is a convenient helper function to print with black foreground. A // newline is appended to format by default. func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) } // Red is a convenient helper function to print with red foreground. A // newline is appended to format by default. func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) } // Green is a convenient helper function to print with green foreground. A // newline is appended to format by default. func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) } // Yellow is a convenient helper function to print with yellow foreground. // A newline is appended to format by default. func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) } // Blue is a convenient helper function to print with blue foreground. A // newline is appended to format by default. func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) } // Magenta is a convenient helper function to print with magenta foreground. // A newline is appended to format by default. func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) } // Cyan is a convenient helper function to print with cyan foreground. A // newline is appended to format by default. func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) } // White is a convenient helper function to print with white foreground. A // newline is appended to format by default. func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) } // BlackString is a convenient helper function to return a string with black // foreground. func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) } // RedString is a convenient helper function to return a string with red // foreground. func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) } // GreenString is a convenient helper function to return a string with green // foreground. func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) } // YellowString is a convenient helper function to return a string with yellow // foreground. func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) } // BlueString is a convenient helper function to return a string with blue // foreground. func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) } // MagentaString is a convenient helper function to return a string with magenta // foreground. func MagentaString(format string, a ...interface{}) string { return colorString(format, FgMagenta, a...) } // CyanString is a convenient helper function to return a string with cyan // foreground. func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) } // WhiteString is a convenient helper function to return a string with white // foreground. func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) } // HiBlack is a convenient helper function to print with hi-intensity black foreground. A // newline is appended to format by default. func HiBlack(format string, a ...interface{}) { colorPrint(format, FgHiBlack, a...) } // HiRed is a convenient helper function to print with hi-intensity red foreground. A // newline is appended to format by default. func HiRed(format string, a ...interface{}) { colorPrint(format, FgHiRed, a...) } // HiGreen is a convenient helper function to print with hi-intensity green foreground. A // newline is appended to format by default. func HiGreen(format string, a ...interface{}) { colorPrint(format, FgHiGreen, a...) } // HiYellow is a convenient helper function to print with hi-intensity yellow foreground. // A newline is appended to format by default. func HiYellow(format string, a ...interface{}) { colorPrint(format, FgHiYellow, a...) } // HiBlue is a convenient helper function to print with hi-intensity blue foreground. A // newline is appended to format by default. func HiBlue(format string, a ...interface{}) { colorPrint(format, FgHiBlue, a...) } // HiMagenta is a convenient helper function to print with hi-intensity magenta foreground. // A newline is appended to format by default. func HiMagenta(format string, a ...interface{}) { colorPrint(format, FgHiMagenta, a...) } // HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A // newline is appended to format by default. func HiCyan(format string, a ...interface{}) { colorPrint(format, FgHiCyan, a...) } // HiWhite is a convenient helper function to print with hi-intensity white foreground. A // newline is appended to format by default. func HiWhite(format string, a ...interface{}) { colorPrint(format, FgHiWhite, a...) } // HiBlackString is a convenient helper function to return a string with hi-intensity black // foreground. func HiBlackString(format string, a ...interface{}) string { return colorString(format, FgHiBlack, a...) } // HiRedString is a convenient helper function to return a string with hi-intensity red // foreground. func HiRedString(format string, a ...interface{}) string { return colorString(format, FgHiRed, a...) } // HiGreenString is a convenient helper function to return a string with hi-intensity green // foreground. func HiGreenString(format string, a ...interface{}) string { return colorString(format, FgHiGreen, a...) } // HiYellowString is a convenient helper function to return a string with hi-intensity yellow // foreground. func HiYellowString(format string, a ...interface{}) string { return colorString(format, FgHiYellow, a...) } // HiBlueString is a convenient helper function to return a string with hi-intensity blue // foreground. func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) } // HiMagentaString is a convenient helper function to return a string with hi-intensity magenta // foreground. func HiMagentaString(format string, a ...interface{}) string { return colorString(format, FgHiMagenta, a...) } // HiCyanString is a convenient helper function to return a string with hi-intensity cyan // foreground. func HiCyanString(format string, a ...interface{}) string { return colorString(format, FgHiCyan, a...) } // HiWhiteString is a convenient helper function to return a string with hi-intensity white // foreground. func HiWhiteString(format string, a ...interface{}) string { return colorString(format, FgHiWhite, a...) }
0
rapidsai_public_repos/roc/vendor/github.com/fatih
rapidsai_public_repos/roc/vendor/github.com/fatih/color/README.md
# color [![](https://github.com/fatih/color/workflows/build/badge.svg)](https://github.com/fatih/color/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/fatih/color)](https://pkg.go.dev/github.com/fatih/color) Color lets you use colorized outputs in terms of [ANSI Escape Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It has support for Windows too! The API can be used in several ways, pick one that suits you. ![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg) ## Install ```bash go get github.com/fatih/color ``` ## Examples ### Standard colors ```go // Print with default helper functions color.Cyan("Prints text in cyan.") // A newline will be appended automatically color.Blue("Prints %s in blue.", "text") // These are using the default foreground colors color.Red("We have red") color.Magenta("And many others ..") ``` ### Mix and reuse colors ```go // Create a new color object c := color.New(color.FgCyan).Add(color.Underline) c.Println("Prints cyan text with an underline.") // Or just add them to New() d := color.New(color.FgCyan, color.Bold) d.Printf("This prints bold cyan %s\n", "too!.") // Mix up foreground and background colors, create new mixes! red := color.New(color.FgRed) boldRed := red.Add(color.Bold) boldRed.Println("This will print text in bold red.") whiteBackground := red.Add(color.BgWhite) whiteBackground.Println("Red text with white background.") ``` ### Use your own output (io.Writer) ```go // Use your own io.Writer output color.New(color.FgBlue).Fprintln(myWriter, "blue color!") blue := color.New(color.FgBlue) blue.Fprint(writer, "This will print text in blue.") ``` ### Custom print functions (PrintFunc) ```go // Create a custom print function for convenience red := color.New(color.FgRed).PrintfFunc() red("Warning") red("Error: %s", err) // Mix up multiple attributes notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() notice("Don't forget this...") ``` ### Custom fprint functions (FprintFunc) ```go blue := color.New(color.FgBlue).FprintfFunc() blue(myWriter, "important notice: %s", stars) // Mix up with multiple attributes success := color.New(color.Bold, color.FgGreen).FprintlnFunc() success(myWriter, "Don't forget this...") ``` ### Insert into noncolor strings (SprintFunc) ```go // Create SprintXxx functions to mix strings with other non-colorized strings: yellow := color.New(color.FgYellow).SprintFunc() red := color.New(color.FgRed).SprintFunc() fmt.Printf("This is a %s and this is %s.\n", yellow("warning"), red("error")) info := color.New(color.FgWhite, color.BgGreen).SprintFunc() fmt.Printf("This %s rocks!\n", info("package")) // Use helper functions fmt.Println("This", color.RedString("warning"), "should be not neglected.") fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.") // Windows supported too! Just don't forget to change the output to color.Output fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) ``` ### Plug into existing code ```go // Use handy standard colors color.Set(color.FgYellow) fmt.Println("Existing text will now be in yellow") fmt.Printf("This one %s\n", "too") color.Unset() // Don't forget to unset // You can mix up parameters color.Set(color.FgMagenta, color.Bold) defer color.Unset() // Use it in your function fmt.Println("All text will now be bold magenta.") ``` ### Disable/Enable color There might be a case where you want to explicitly disable/enable color output. the `go-isatty` package will automatically disable color output for non-tty output streams (for example if the output were piped directly to `less`). The `color` package also disables color output if the [`NO_COLOR`](https://no-color.org) environment variable is set (regardless of its value). `Color` has support to disable/enable colors programatically both globally and for single color definitions. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: ```go var flagNoColor = flag.Bool("no-color", false, "Disable color output") if *flagNoColor { color.NoColor = true // disables colorized output } ``` It also has support for single color definitions (local). You can disable/enable color output on the fly: ```go c := color.New(color.FgCyan) c.Println("Prints cyan text") c.DisableColor() c.Println("This is printed without any color") c.EnableColor() c.Println("This prints again cyan...") ``` ## GitHub Actions To output color in GitHub Actions (or other CI systems that support ANSI colors), make sure to set `color.NoColor = false` so that it bypasses the check for non-tty output streams. ## Todo * Save/Return previous values * Evaluate fmt.Formatter interface ## Credits * [Fatih Arslan](https://github.com/fatih) * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable) ## License The MIT License (MIT) - see [`LICENSE.md`](https://github.com/fatih/color/blob/master/LICENSE.md) for more details
0
rapidsai_public_repos/roc/vendor/github.com/fatih
rapidsai_public_repos/roc/vendor/github.com/fatih/color/LICENSE.md
The MIT License (MIT) Copyright (c) 2013 Fatih Arslan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0
rapidsai_public_repos/roc/vendor/github.com/fatih
rapidsai_public_repos/roc/vendor/github.com/fatih/color/doc.go
/* Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: color.Cyan("Prints text in cyan.") // a newline will be appended automatically color.Blue("Prints %s in blue.", "text") // More default foreground colors.. color.Red("We have red") color.Yellow("Yellow color too!") color.Magenta("And many others ..") // Hi-intensity colors color.HiGreen("Bright green color.") color.HiBlack("Bright black means gray..") color.HiWhite("Shiny white color!") However there are times where custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. // Create a new color object c := color.New(color.FgCyan).Add(color.Underline) c.Println("Prints cyan text with an underline.") // Or just add them to New() d := color.New(color.FgCyan, color.Bold) d.Printf("This prints bold cyan %s\n", "too!.") // Mix up foreground and background colors, create new mixes! red := color.New(color.FgRed) boldRed := red.Add(color.Bold) boldRed.Println("This will print text in bold red.") whiteBackground := red.Add(color.BgWhite) whiteBackground.Println("Red text with White background.") // Use your own io.Writer output color.New(color.FgBlue).Fprintln(myWriter, "blue color!") blue := color.New(color.FgBlue) blue.Fprint(myWriter, "This will print text in blue.") You can create PrintXxx functions to simplify even more: // Create a custom print function for convenient red := color.New(color.FgRed).PrintfFunc() red("warning") red("error: %s", err) // Mix up multiple attributes notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() notice("don't forget this...") You can also FprintXxx functions to pass your own io.Writer: blue := color.New(FgBlue).FprintfFunc() blue(myWriter, "important notice: %s", stars) // Mix up with multiple attributes success := color.New(color.Bold, color.FgGreen).FprintlnFunc() success(myWriter, don't forget this...") Or create SprintXxx functions to mix strings with other non-colorized strings: yellow := New(FgYellow).SprintFunc() red := New(FgRed).SprintFunc() fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error")) info := New(FgWhite, BgGreen).SprintFunc() fmt.Printf("this %s rocks!\n", info("package")) Windows support is enabled by default. All Print functions work as intended. However only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) info := New(FgWhite, BgGreen).SprintFunc() fmt.Fprintf(color.Output, "this %s rocks!\n", info("package")) Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. // Use handy standard colors. color.Set(color.FgYellow) fmt.Println("Existing text will be now in Yellow") fmt.Printf("This one %s\n", "too") color.Unset() // don't forget to unset // You can mix up parameters color.Set(color.FgMagenta, color.Bold) defer color.Unset() // use it in your function fmt.Println("All text will be now bold magenta.") There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: var flagNoColor = flag.Bool("no-color", false, "Disable color output") if *flagNoColor { color.NoColor = true // disables colorized output } You can also disable the color by setting the NO_COLOR environment variable to any value. It also has support for single color definitions (local). You can disable/enable color output on the fly: c := color.New(color.FgCyan) c.Println("Prints cyan text") c.DisableColor() c.Println("This is printed without any color") c.EnableColor() c.Println("This prints again cyan...") */ package color
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/decode.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package properties import ( "fmt" "reflect" "strconv" "strings" "time" ) // Decode assigns property values to exported fields of a struct. // // Decode traverses v recursively and returns an error if a value cannot be // converted to the field type or a required value is missing for a field. // // The following type dependent decodings are used: // // String, boolean, numeric fields have the value of the property key assigned. // The property key name is the name of the field. A different key and a default // value can be set in the field's tag. Fields without default value are // required. If the value cannot be converted to the field type an error is // returned. // // time.Duration fields have the result of time.ParseDuration() assigned. // // time.Time fields have the vaule of time.Parse() assigned. The default layout // is time.RFC3339 but can be set in the field's tag. // // Arrays and slices of string, boolean, numeric, time.Duration and time.Time // fields have the value interpreted as a comma separated list of values. The // individual values are trimmed of whitespace and empty values are ignored. A // default value can be provided as a semicolon separated list in the field's // tag. // // Struct fields are decoded recursively using the field name plus "." as // prefix. The prefix (without dot) can be overridden in the field's tag. // Default values are not supported in the field's tag. Specify them on the // fields of the inner struct instead. // // Map fields must have a key of type string and are decoded recursively by // using the field's name plus ".' as prefix and the next element of the key // name as map key. The prefix (without dot) can be overridden in the field's // tag. Default values are not supported. // // Examples: // // // Field is ignored. // Field int `properties:"-"` // // // Field is assigned value of 'Field'. // Field int // // // Field is assigned value of 'myName'. // Field int `properties:"myName"` // // // Field is assigned value of key 'myName' and has a default // // value 15 if the key does not exist. // Field int `properties:"myName,default=15"` // // // Field is assigned value of key 'Field' and has a default // // value 15 if the key does not exist. // Field int `properties:",default=15"` // // // Field is assigned value of key 'date' and the date // // is in format 2006-01-02 // Field time.Time `properties:"date,layout=2006-01-02"` // // // Field is assigned the non-empty and whitespace trimmed // // values of key 'Field' split by commas. // Field []string // // // Field is assigned the non-empty and whitespace trimmed // // values of key 'Field' split by commas and has a default // // value ["a", "b", "c"] if the key does not exist. // Field []string `properties:",default=a;b;c"` // // // Field is decoded recursively with "Field." as key prefix. // Field SomeStruct // // // Field is decoded recursively with "myName." as key prefix. // Field SomeStruct `properties:"myName"` // // // Field is decoded recursively with "Field." as key prefix // // and the next dotted element of the key as map key. // Field map[string]string // // // Field is decoded recursively with "myName." as key prefix // // and the next dotted element of the key as map key. // Field map[string]string `properties:"myName"` func (p *Properties) Decode(x interface{}) error { t, v := reflect.TypeOf(x), reflect.ValueOf(x) if t.Kind() != reflect.Ptr || v.Elem().Type().Kind() != reflect.Struct { return fmt.Errorf("not a pointer to struct: %s", t) } if err := dec(p, "", nil, nil, v); err != nil { return err } return nil } func dec(p *Properties, key string, def *string, opts map[string]string, v reflect.Value) error { t := v.Type() // value returns the property value for key or the default if provided. value := func() (string, error) { if val, ok := p.Get(key); ok { return val, nil } if def != nil { return *def, nil } return "", fmt.Errorf("missing required key %s", key) } // conv converts a string to a value of the given type. conv := func(s string, t reflect.Type) (val reflect.Value, err error) { var v interface{} switch { case isDuration(t): v, err = time.ParseDuration(s) case isTime(t): layout := opts["layout"] if layout == "" { layout = time.RFC3339 } v, err = time.Parse(layout, s) case isBool(t): v, err = boolVal(s), nil case isString(t): v, err = s, nil case isFloat(t): v, err = strconv.ParseFloat(s, 64) case isInt(t): v, err = strconv.ParseInt(s, 10, 64) case isUint(t): v, err = strconv.ParseUint(s, 10, 64) default: return reflect.Zero(t), fmt.Errorf("unsupported type %s", t) } if err != nil { return reflect.Zero(t), err } return reflect.ValueOf(v).Convert(t), nil } // keydef returns the property key and the default value based on the // name of the struct field and the options in the tag. keydef := func(f reflect.StructField) (string, *string, map[string]string) { _key, _opts := parseTag(f.Tag.Get("properties")) var _def *string if d, ok := _opts["default"]; ok { _def = &d } if _key != "" { return _key, _def, _opts } return f.Name, _def, _opts } switch { case isDuration(t) || isTime(t) || isBool(t) || isString(t) || isFloat(t) || isInt(t) || isUint(t): s, err := value() if err != nil { return err } val, err := conv(s, t) if err != nil { return err } v.Set(val) case isPtr(t): return dec(p, key, def, opts, v.Elem()) case isStruct(t): for i := 0; i < v.NumField(); i++ { fv := v.Field(i) fk, def, opts := keydef(t.Field(i)) if !fv.CanSet() { return fmt.Errorf("cannot set %s", t.Field(i).Name) } if fk == "-" { continue } if key != "" { fk = key + "." + fk } if err := dec(p, fk, def, opts, fv); err != nil { return err } } return nil case isArray(t): val, err := value() if err != nil { return err } vals := split(val, ";") a := reflect.MakeSlice(t, 0, len(vals)) for _, s := range vals { val, err := conv(s, t.Elem()) if err != nil { return err } a = reflect.Append(a, val) } v.Set(a) case isMap(t): valT := t.Elem() m := reflect.MakeMap(t) for postfix := range p.FilterStripPrefix(key + ".").m { pp := strings.SplitN(postfix, ".", 2) mk, mv := pp[0], reflect.New(valT) if err := dec(p, key+"."+mk, nil, nil, mv); err != nil { return err } m.SetMapIndex(reflect.ValueOf(mk), mv.Elem()) } v.Set(m) default: return fmt.Errorf("unsupported type %s", t) } return nil } // split splits a string on sep, trims whitespace of elements // and omits empty elements func split(s string, sep string) []string { var a []string for _, v := range strings.Split(s, sep) { if v = strings.TrimSpace(v); v != "" { a = append(a, v) } } return a } // parseTag parses a "key,k=v,k=v,..." func parseTag(tag string) (key string, opts map[string]string) { opts = map[string]string{} for i, s := range strings.Split(tag, ",") { if i == 0 { key = s continue } pp := strings.SplitN(s, "=", 2) if len(pp) == 1 { opts[pp[0]] = "" } else { opts[pp[0]] = pp[1] } } return key, opts } func isArray(t reflect.Type) bool { return t.Kind() == reflect.Array || t.Kind() == reflect.Slice } func isBool(t reflect.Type) bool { return t.Kind() == reflect.Bool } func isDuration(t reflect.Type) bool { return t == reflect.TypeOf(time.Second) } func isMap(t reflect.Type) bool { return t.Kind() == reflect.Map } func isPtr(t reflect.Type) bool { return t.Kind() == reflect.Ptr } func isString(t reflect.Type) bool { return t.Kind() == reflect.String } func isStruct(t reflect.Type) bool { return t.Kind() == reflect.Struct } func isTime(t reflect.Type) bool { return t == reflect.TypeOf(time.Time{}) } func isFloat(t reflect.Type) bool { return t.Kind() == reflect.Float32 || t.Kind() == reflect.Float64 } func isInt(t reflect.Type) bool { return t.Kind() == reflect.Int || t.Kind() == reflect.Int8 || t.Kind() == reflect.Int16 || t.Kind() == reflect.Int32 || t.Kind() == reflect.Int64 } func isUint(t reflect.Type) bool { return t.Kind() == reflect.Uint || t.Kind() == reflect.Uint8 || t.Kind() == reflect.Uint16 || t.Kind() == reflect.Uint32 || t.Kind() == reflect.Uint64 }
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/README.md
[![](https://img.shields.io/github/tag/magiconair/properties.svg?style=flat-square&label=release)](https://github.com/magiconair/properties/releases) [![Travis CI Status](https://img.shields.io/travis/magiconair/properties.svg?branch=master&style=flat-square&label=travis)](https://travis-ci.org/magiconair/properties) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg?style=flat-square)](https://raw.githubusercontent.com/magiconair/properties/master/LICENSE) [![GoDoc](http://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](http://godoc.org/github.com/magiconair/properties) # Overview #### Please run `git pull --tags` to update the tags. See [below](#updated-git-tags) why. properties is a Go library for reading and writing properties files. It supports reading from multiple files or URLs and Spring style recursive property expansion of expressions like `${key}` to their corresponding value. Value expressions can refer to other keys like in `${key}` or to environment variables like in `${USER}`. Filenames can also contain environment variables like in `/home/${USER}/myapp.properties`. Properties can be decoded into structs, maps, arrays and values through struct tags. Comments and the order of keys are preserved. Comments can be modified and can be written to the output. The properties library supports both ISO-8859-1 and UTF-8 encoded data. Starting from version 1.3.0 the behavior of the MustXXX() functions is configurable by providing a custom `ErrorHandler` function. The default has changed from `panic` to `log.Fatal` but this is configurable and custom error handling functions can be provided. See the package documentation for details. Read the full documentation on [![GoDoc](http://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](http://godoc.org/github.com/magiconair/properties) ## Getting Started ```go import ( "flag" "github.com/magiconair/properties" ) func main() { // init from a file p := properties.MustLoadFile("${HOME}/config.properties", properties.UTF8) // or multiple files p = properties.MustLoadFiles([]string{ "${HOME}/config.properties", "${HOME}/config-${USER}.properties", }, properties.UTF8, true) // or from a map p = properties.LoadMap(map[string]string{"key": "value", "abc": "def"}) // or from a string p = properties.MustLoadString("key=value\nabc=def") // or from a URL p = properties.MustLoadURL("http://host/path") // or from multiple URLs p = properties.MustLoadURL([]string{ "http://host/config", "http://host/config-${USER}", }, true) // or from flags p.MustFlag(flag.CommandLine) // get values through getters host := p.MustGetString("host") port := p.GetInt("port", 8080) // or through Decode type Config struct { Host string `properties:"host"` Port int `properties:"port,default=9000"` Accept []string `properties:"accept,default=image/png;image;gif"` Timeout time.Duration `properties:"timeout,default=5s"` } var cfg Config if err := p.Decode(&cfg); err != nil { log.Fatal(err) } } ``` ## Installation and Upgrade ``` $ go get -u github.com/magiconair/properties ``` ## License 2 clause BSD license. See [LICENSE](https://github.com/magiconair/properties/blob/master/LICENSE) file for details. ## ToDo * Dump contents with passwords and secrets obscured ## Updated Git tags #### 13 Feb 2018 I realized that all of the git tags I had pushed before v1.7.5 were lightweight tags and I've only recently learned that this doesn't play well with `git describe` 😞 I have replaced all lightweight tags with signed tags using this script which should retain the commit date, name and email address. Please run `git pull --tags` to update them. Worst case you have to reclone the repo. ```shell #!/bin/bash tag=$1 echo "Updating $tag" date=$(git show ${tag}^0 --format=%aD | head -1) email=$(git show ${tag}^0 --format=%aE | head -1) name=$(git show ${tag}^0 --format=%aN | head -1) GIT_COMMITTER_DATE="$date" GIT_COMMITTER_NAME="$name" GIT_COMMITTER_EMAIL="$email" git tag -s -f ${tag} ${tag}^0 -m ${tag} ``` I apologize for the inconvenience. Frank
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/CHANGELOG.md
## Changelog ### [1.8.2](https://github.com/magiconair/properties/tree/v1.8.2) - 25 Aug 2020 * [PR #36](https://github.com/magiconair/properties/pull/36): Escape backslash on write This patch ensures that backslashes are escaped on write. Existing applications which rely on the old behavior may need to be updated. Thanks to [@apesternikov](https://github.com/apesternikov) for the patch. * [PR #42](https://github.com/magiconair/properties/pull/42): Made Content-Type check whitespace agnostic in LoadURL() Thanks to [@aliras1](https://github.com/aliras1) for the patch. * [PR #41](https://github.com/magiconair/properties/pull/41): Make key/value separator configurable on Write() Thanks to [@mkjor](https://github.com/mkjor) for the patch. * [PR #40](https://github.com/magiconair/properties/pull/40): Add method to return a sorted list of keys Thanks to [@mkjor](https://github.com/mkjor) for the patch. ### [1.8.1](https://github.com/magiconair/properties/tree/v1.8.1) - 10 May 2019 * [PR #35](https://github.com/magiconair/properties/pull/35): Close body always after request This patch ensures that in `LoadURL` the response body is always closed. Thanks to [@liubog2008](https://github.com/liubog2008) for the patch. ### [1.8](https://github.com/magiconair/properties/tree/v1.8) - 15 May 2018 * [PR #26](https://github.com/magiconair/properties/pull/26): Disable expansion during loading This adds the option to disable property expansion during loading. Thanks to [@kmala](https://github.com/kmala) for the patch. ### [1.7.6](https://github.com/magiconair/properties/tree/v1.7.6) - 14 Feb 2018 * [PR #29](https://github.com/magiconair/properties/pull/29): Reworked expansion logic to handle more complex cases. See PR for an example. Thanks to [@yobert](https://github.com/yobert) for the fix. ### [1.7.5](https://github.com/magiconair/properties/tree/v1.7.5) - 13 Feb 2018 * [PR #28](https://github.com/magiconair/properties/pull/28): Support duplicate expansions in the same value Values which expand the same key multiple times (e.g. `key=${a} ${a}`) will no longer fail with a `circular reference error`. Thanks to [@yobert](https://github.com/yobert) for the fix. ### [1.7.4](https://github.com/magiconair/properties/tree/v1.7.4) - 31 Oct 2017 * [Issue #23](https://github.com/magiconair/properties/issues/23): Ignore blank lines with whitespaces * [PR #24](https://github.com/magiconair/properties/pull/24): Update keys when DisableExpansion is enabled Thanks to [@mgurov](https://github.com/mgurov) for the fix. ### [1.7.3](https://github.com/magiconair/properties/tree/v1.7.3) - 10 Jul 2017 * [Issue #17](https://github.com/magiconair/properties/issues/17): Add [SetValue()](http://godoc.org/github.com/magiconair/properties#Properties.SetValue) method to set values generically * [Issue #22](https://github.com/magiconair/properties/issues/22): Add [LoadMap()](http://godoc.org/github.com/magiconair/properties#LoadMap) function to load properties from a string map ### [1.7.2](https://github.com/magiconair/properties/tree/v1.7.2) - 20 Mar 2017 * [Issue #15](https://github.com/magiconair/properties/issues/15): Drop gocheck dependency * [PR #21](https://github.com/magiconair/properties/pull/21): Add [Map()](http://godoc.org/github.com/magiconair/properties#Properties.Map) and [FilterFunc()](http://godoc.org/github.com/magiconair/properties#Properties.FilterFunc) ### [1.7.1](https://github.com/magiconair/properties/tree/v1.7.1) - 13 Jan 2017 * [Issue #14](https://github.com/magiconair/properties/issues/14): Decouple TestLoadExpandedFile from `$USER` * [PR #12](https://github.com/magiconair/properties/pull/12): Load from files and URLs * [PR #16](https://github.com/magiconair/properties/pull/16): Keep gofmt happy * [PR #18](https://github.com/magiconair/properties/pull/18): Fix Delete() function ### [1.7.0](https://github.com/magiconair/properties/tree/v1.7.0) - 20 Mar 2016 * [Issue #10](https://github.com/magiconair/properties/issues/10): Add [LoadURL,LoadURLs,MustLoadURL,MustLoadURLs](http://godoc.org/github.com/magiconair/properties#LoadURL) method to load properties from a URL. * [Issue #11](https://github.com/magiconair/properties/issues/11): Add [LoadString,MustLoadString](http://godoc.org/github.com/magiconair/properties#LoadString) method to load properties from an UTF8 string. * [PR #8](https://github.com/magiconair/properties/pull/8): Add [MustFlag](http://godoc.org/github.com/magiconair/properties#Properties.MustFlag) method to provide overrides via command line flags. (@pascaldekloe) ### [1.6.0](https://github.com/magiconair/properties/tree/v1.6.0) - 11 Dec 2015 * Add [Decode](http://godoc.org/github.com/magiconair/properties#Properties.Decode) method to populate struct from properties via tags. ### [1.5.6](https://github.com/magiconair/properties/tree/v1.5.6) - 18 Oct 2015 * Vendored in gopkg.in/check.v1 ### [1.5.5](https://github.com/magiconair/properties/tree/v1.5.5) - 31 Jul 2015 * [PR #6](https://github.com/magiconair/properties/pull/6): Add [Delete](http://godoc.org/github.com/magiconair/properties#Properties.Delete) method to remove keys including comments. (@gerbenjacobs) ### [1.5.4](https://github.com/magiconair/properties/tree/v1.5.4) - 23 Jun 2015 * [Issue #5](https://github.com/magiconair/properties/issues/5): Allow disabling of property expansion [DisableExpansion](http://godoc.org/github.com/magiconair/properties#Properties.DisableExpansion). When property expansion is disabled Properties become a simple key/value store and don't check for circular references. ### [1.5.3](https://github.com/magiconair/properties/tree/v1.5.3) - 02 Jun 2015 * [Issue #4](https://github.com/magiconair/properties/issues/4): Maintain key order in [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) and [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp) ### [1.5.2](https://github.com/magiconair/properties/tree/v1.5.2) - 10 Apr 2015 * [Issue #3](https://github.com/magiconair/properties/issues/3): Don't print comments in [WriteComment()](http://godoc.org/github.com/magiconair/properties#Properties.WriteComment) if they are all empty * Add clickable links to README ### [1.5.1](https://github.com/magiconair/properties/tree/v1.5.1) - 08 Dec 2014 * Added [GetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.GetParsedDuration) and [MustGetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.MustGetParsedDuration) for values specified compatible with [time.ParseDuration()](http://golang.org/pkg/time/#ParseDuration). ### [1.5.0](https://github.com/magiconair/properties/tree/v1.5.0) - 18 Nov 2014 * Added support for single and multi-line comments (reading, writing and updating) * The order of keys is now preserved * Calling [Set()](http://godoc.org/github.com/magiconair/properties#Properties.Set) with an empty key now silently ignores the call and does not create a new entry * Added a [MustSet()](http://godoc.org/github.com/magiconair/properties#Properties.MustSet) method * Migrated test library from launchpad.net/gocheck to [gopkg.in/check.v1](http://gopkg.in/check.v1) ### [1.4.2](https://github.com/magiconair/properties/tree/v1.4.2) - 15 Nov 2014 * [Issue #2](https://github.com/magiconair/properties/issues/2): Fixed goroutine leak in parser which created two lexers but cleaned up only one ### [1.4.1](https://github.com/magiconair/properties/tree/v1.4.1) - 13 Nov 2014 * [Issue #1](https://github.com/magiconair/properties/issues/1): Fixed bug in Keys() method which returned an empty string ### [1.4.0](https://github.com/magiconair/properties/tree/v1.4.0) - 23 Sep 2014 * Added [Keys()](http://godoc.org/github.com/magiconair/properties#Properties.Keys) to get the keys * Added [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp) and [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) to get a subset of the properties ### [1.3.0](https://github.com/magiconair/properties/tree/v1.3.0) - 18 Mar 2014 * Added support for time.Duration * Made MustXXX() failure beha[ior configurable (log.Fatal, panic](https://github.com/magiconair/properties/tree/vior configurable (log.Fatal, panic) - custom) * Changed default of MustXXX() failure from panic to log.Fatal ### [1.2.0](https://github.com/magiconair/properties/tree/v1.2.0) - 05 Mar 2014 * Added MustGet... functions * Added support for int and uint with range checks on 32 bit platforms ### [1.1.0](https://github.com/magiconair/properties/tree/v1.1.0) - 20 Jan 2014 * Renamed from goproperties to properties * Added support for expansion of environment vars in filenames and value expressions * Fixed bug where value expressions were not at the start of the string ### [1.0.0](https://github.com/magiconair/properties/tree/v1.0.0) - 7 Jan 2014 * Initial release
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/parser.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package properties import ( "fmt" "runtime" ) type parser struct { lex *lexer } func parse(input string) (properties *Properties, err error) { p := &parser{lex: lex(input)} defer p.recover(&err) properties = NewProperties() key := "" comments := []string{} for { token := p.expectOneOf(itemComment, itemKey, itemEOF) switch token.typ { case itemEOF: goto done case itemComment: comments = append(comments, token.val) continue case itemKey: key = token.val if _, ok := properties.m[key]; !ok { properties.k = append(properties.k, key) } } token = p.expectOneOf(itemValue, itemEOF) if len(comments) > 0 { properties.c[key] = comments comments = []string{} } switch token.typ { case itemEOF: properties.m[key] = "" goto done case itemValue: properties.m[key] = token.val } } done: return properties, nil } func (p *parser) errorf(format string, args ...interface{}) { format = fmt.Sprintf("properties: Line %d: %s", p.lex.lineNumber(), format) panic(fmt.Errorf(format, args...)) } func (p *parser) expect(expected itemType) (token item) { token = p.lex.nextItem() if token.typ != expected { p.unexpected(token) } return token } func (p *parser) expectOneOf(expected ...itemType) (token item) { token = p.lex.nextItem() for _, v := range expected { if token.typ == v { return token } } p.unexpected(token) panic("unexpected token") } func (p *parser) unexpected(token item) { p.errorf(token.String()) } // recover is the handler that turns panics into returns from the top level of Parse. func (p *parser) recover(errp *error) { e := recover() if e != nil { if _, ok := e.(runtime.Error); ok { panic(e) } *errp = e.(error) } return }
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/LICENSE.md
Copyright (c) 2013-2020, Frank Schroeder 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. 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.
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/integrate.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package properties import "flag" // MustFlag sets flags that are skipped by dst.Parse when p contains // the respective key for flag.Flag.Name. // // It's use is recommended with command line arguments as in: // flag.Parse() // p.MustFlag(flag.CommandLine) func (p *Properties) MustFlag(dst *flag.FlagSet) { m := make(map[string]*flag.Flag) dst.VisitAll(func(f *flag.Flag) { m[f.Name] = f }) dst.Visit(func(f *flag.Flag) { delete(m, f.Name) // overridden }) for name, f := range m { v, ok := p.Get(name) if !ok { continue } if err := f.Value.Set(v); err != nil { ErrorHandler(err) } } }
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/load.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package properties import ( "fmt" "io/ioutil" "net/http" "os" "strings" ) // Encoding specifies encoding of the input data. type Encoding uint const ( // utf8Default is a private placeholder for the zero value of Encoding to // ensure that it has the correct meaning. UTF8 is the default encoding but // was assigned a non-zero value which cannot be changed without breaking // existing code. Clients should continue to use the public constants. utf8Default Encoding = iota // UTF8 interprets the input data as UTF-8. UTF8 // ISO_8859_1 interprets the input data as ISO-8859-1. ISO_8859_1 ) type Loader struct { // Encoding determines how the data from files and byte buffers // is interpreted. For URLs the Content-Type header is used // to determine the encoding of the data. Encoding Encoding // DisableExpansion configures the property expansion of the // returned property object. When set to true, the property values // will not be expanded and the Property object will not be checked // for invalid expansion expressions. DisableExpansion bool // IgnoreMissing configures whether missing files or URLs which return // 404 are reported as errors. When set to true, missing files and 404 // status codes are not reported as errors. IgnoreMissing bool } // Load reads a buffer into a Properties struct. func (l *Loader) LoadBytes(buf []byte) (*Properties, error) { return l.loadBytes(buf, l.Encoding) } // LoadAll reads the content of multiple URLs or files in the given order into // a Properties struct. If IgnoreMissing is true then a 404 status code or // missing file will not be reported as error. Encoding sets the encoding for // files. For the URLs see LoadURL for the Content-Type header and the // encoding. func (l *Loader) LoadAll(names []string) (*Properties, error) { all := NewProperties() for _, name := range names { n, err := expandName(name) if err != nil { return nil, err } var p *Properties switch { case strings.HasPrefix(n, "http://"): p, err = l.LoadURL(n) case strings.HasPrefix(n, "https://"): p, err = l.LoadURL(n) default: p, err = l.LoadFile(n) } if err != nil { return nil, err } all.Merge(p) } all.DisableExpansion = l.DisableExpansion if all.DisableExpansion { return all, nil } return all, all.check() } // LoadFile reads a file into a Properties struct. // If IgnoreMissing is true then a missing file will not be // reported as error. func (l *Loader) LoadFile(filename string) (*Properties, error) { data, err := ioutil.ReadFile(filename) if err != nil { if l.IgnoreMissing && os.IsNotExist(err) { LogPrintf("properties: %s not found. skipping", filename) return NewProperties(), nil } return nil, err } return l.loadBytes(data, l.Encoding) } // LoadURL reads the content of the URL into a Properties struct. // // The encoding is determined via the Content-Type header which // should be set to 'text/plain'. If the 'charset' parameter is // missing, 'iso-8859-1' or 'latin1' the encoding is set to // ISO-8859-1. If the 'charset' parameter is set to 'utf-8' the // encoding is set to UTF-8. A missing content type header is // interpreted as 'text/plain; charset=utf-8'. func (l *Loader) LoadURL(url string) (*Properties, error) { resp, err := http.Get(url) if err != nil { return nil, fmt.Errorf("properties: error fetching %q. %s", url, err) } defer resp.Body.Close() if resp.StatusCode == 404 && l.IgnoreMissing { LogPrintf("properties: %s returned %d. skipping", url, resp.StatusCode) return NewProperties(), nil } if resp.StatusCode != 200 { return nil, fmt.Errorf("properties: %s returned %d", url, resp.StatusCode) } body, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, fmt.Errorf("properties: %s error reading response. %s", url, err) } ct := resp.Header.Get("Content-Type") ct = strings.Join(strings.Fields(ct), "") var enc Encoding switch strings.ToLower(ct) { case "text/plain", "text/plain;charset=iso-8859-1", "text/plain;charset=latin1": enc = ISO_8859_1 case "", "text/plain;charset=utf-8": enc = UTF8 default: return nil, fmt.Errorf("properties: invalid content type %s", ct) } return l.loadBytes(body, enc) } func (l *Loader) loadBytes(buf []byte, enc Encoding) (*Properties, error) { p, err := parse(convert(buf, enc)) if err != nil { return nil, err } p.DisableExpansion = l.DisableExpansion if p.DisableExpansion { return p, nil } return p, p.check() } // Load reads a buffer into a Properties struct. func Load(buf []byte, enc Encoding) (*Properties, error) { l := &Loader{Encoding: enc} return l.LoadBytes(buf) } // LoadString reads an UTF8 string into a properties struct. func LoadString(s string) (*Properties, error) { l := &Loader{Encoding: UTF8} return l.LoadBytes([]byte(s)) } // LoadMap creates a new Properties struct from a string map. func LoadMap(m map[string]string) *Properties { p := NewProperties() for k, v := range m { p.Set(k, v) } return p } // LoadFile reads a file into a Properties struct. func LoadFile(filename string, enc Encoding) (*Properties, error) { l := &Loader{Encoding: enc} return l.LoadAll([]string{filename}) } // LoadFiles reads multiple files in the given order into // a Properties struct. If 'ignoreMissing' is true then // non-existent files will not be reported as error. func LoadFiles(filenames []string, enc Encoding, ignoreMissing bool) (*Properties, error) { l := &Loader{Encoding: enc, IgnoreMissing: ignoreMissing} return l.LoadAll(filenames) } // LoadURL reads the content of the URL into a Properties struct. // See Loader#LoadURL for details. func LoadURL(url string) (*Properties, error) { l := &Loader{Encoding: UTF8} return l.LoadAll([]string{url}) } // LoadURLs reads the content of multiple URLs in the given order into a // Properties struct. If IgnoreMissing is true then a 404 status code will // not be reported as error. See Loader#LoadURL for the Content-Type header // and the encoding. func LoadURLs(urls []string, ignoreMissing bool) (*Properties, error) { l := &Loader{Encoding: UTF8, IgnoreMissing: ignoreMissing} return l.LoadAll(urls) } // LoadAll reads the content of multiple URLs or files in the given order into a // Properties struct. If 'ignoreMissing' is true then a 404 status code or missing file will // not be reported as error. Encoding sets the encoding for files. For the URLs please see // LoadURL for the Content-Type header and the encoding. func LoadAll(names []string, enc Encoding, ignoreMissing bool) (*Properties, error) { l := &Loader{Encoding: enc, IgnoreMissing: ignoreMissing} return l.LoadAll(names) } // MustLoadString reads an UTF8 string into a Properties struct and // panics on error. func MustLoadString(s string) *Properties { return must(LoadString(s)) } // MustLoadFile reads a file into a Properties struct and // panics on error. func MustLoadFile(filename string, enc Encoding) *Properties { return must(LoadFile(filename, enc)) } // MustLoadFiles reads multiple files in the given order into // a Properties struct and panics on error. If 'ignoreMissing' // is true then non-existent files will not be reported as error. func MustLoadFiles(filenames []string, enc Encoding, ignoreMissing bool) *Properties { return must(LoadFiles(filenames, enc, ignoreMissing)) } // MustLoadURL reads the content of a URL into a Properties struct and // panics on error. func MustLoadURL(url string) *Properties { return must(LoadURL(url)) } // MustLoadURLs reads the content of multiple URLs in the given order into a // Properties struct and panics on error. If 'ignoreMissing' is true then a 404 // status code will not be reported as error. func MustLoadURLs(urls []string, ignoreMissing bool) *Properties { return must(LoadURLs(urls, ignoreMissing)) } // MustLoadAll reads the content of multiple URLs or files in the given order into a // Properties struct. If 'ignoreMissing' is true then a 404 status code or missing file will // not be reported as error. Encoding sets the encoding for files. For the URLs please see // LoadURL for the Content-Type header and the encoding. It panics on error. func MustLoadAll(names []string, enc Encoding, ignoreMissing bool) *Properties { return must(LoadAll(names, enc, ignoreMissing)) } func must(p *Properties, err error) *Properties { if err != nil { ErrorHandler(err) } return p } // expandName expands ${ENV_VAR} expressions in a name. // If the environment variable does not exist then it will be replaced // with an empty string. Malformed expressions like "${ENV_VAR" will // be reported as error. func expandName(name string) (string, error) { return expand(name, []string{}, "${", "}", make(map[string]string)) } // Interprets a byte buffer either as an ISO-8859-1 or UTF-8 encoded string. // For ISO-8859-1 we can convert each byte straight into a rune since the // first 256 unicode code points cover ISO-8859-1. func convert(buf []byte, enc Encoding) string { switch enc { case utf8Default, UTF8: return string(buf) case ISO_8859_1: runes := make([]rune, len(buf)) for i, b := range buf { runes[i] = rune(b) } return string(runes) default: ErrorHandler(fmt.Errorf("unsupported encoding %v", enc)) } panic("ErrorHandler should exit") }
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/doc.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package properties provides functions for reading and writing // ISO-8859-1 and UTF-8 encoded .properties files and has // support for recursive property expansion. // // Java properties files are ISO-8859-1 encoded and use Unicode // literals for characters outside the ISO character set. Unicode // literals can be used in UTF-8 encoded properties files but // aren't necessary. // // To load a single properties file use MustLoadFile(): // // p := properties.MustLoadFile(filename, properties.UTF8) // // To load multiple properties files use MustLoadFiles() // which loads the files in the given order and merges the // result. Missing properties files can be ignored if the // 'ignoreMissing' flag is set to true. // // Filenames can contain environment variables which are expanded // before loading. // // f1 := "/etc/myapp/myapp.conf" // f2 := "/home/${USER}/myapp.conf" // p := MustLoadFiles([]string{f1, f2}, properties.UTF8, true) // // All of the different key/value delimiters ' ', ':' and '=' are // supported as well as the comment characters '!' and '#' and // multi-line values. // // ! this is a comment // # and so is this // // # the following expressions are equal // key value // key=value // key:value // key = value // key : value // key = val\ // ue // // Properties stores all comments preceding a key and provides // GetComments() and SetComments() methods to retrieve and // update them. The convenience functions GetComment() and // SetComment() allow access to the last comment. The // WriteComment() method writes properties files including // the comments and with the keys in the original order. // This can be used for sanitizing properties files. // // Property expansion is recursive and circular references // and malformed expressions are not allowed and cause an // error. Expansion of environment variables is supported. // // # standard property // key = value // // # property expansion: key2 = value // key2 = ${key} // // # recursive expansion: key3 = value // key3 = ${key2} // // # circular reference (error) // key = ${key} // // # malformed expression (error) // key = ${ke // // # refers to the users' home dir // home = ${HOME} // // # local key takes precedence over env var: u = foo // USER = foo // u = ${USER} // // The default property expansion format is ${key} but can be // changed by setting different pre- and postfix values on the // Properties object. // // p := properties.NewProperties() // p.Prefix = "#[" // p.Postfix = "]#" // // Properties provides convenience functions for getting typed // values with default values if the key does not exist or the // type conversion failed. // // # Returns true if the value is either "1", "on", "yes" or "true" // # Returns false for every other value and the default value if // # the key does not exist. // v = p.GetBool("key", false) // // # Returns the value if the key exists and the format conversion // # was successful. Otherwise, the default value is returned. // v = p.GetInt64("key", 999) // v = p.GetUint64("key", 999) // v = p.GetFloat64("key", 123.0) // v = p.GetString("key", "def") // v = p.GetDuration("key", 999) // // As an alternative properties may be applied with the standard // library's flag implementation at any time. // // # Standard configuration // v = flag.Int("key", 999, "help message") // flag.Parse() // // # Merge p into the flag set // p.MustFlag(flag.CommandLine) // // Properties provides several MustXXX() convenience functions // which will terminate the app if an error occurs. The behavior // of the failure is configurable and the default is to call // log.Fatal(err). To have the MustXXX() functions panic instead // of logging the error set a different ErrorHandler before // you use the Properties package. // // properties.ErrorHandler = properties.PanicHandler // // # Will panic instead of logging an error // p := properties.MustLoadFile("config.properties") // // You can also provide your own ErrorHandler function. The only requirement // is that the error handler function must exit after handling the error. // // properties.ErrorHandler = func(err error) { // fmt.Println(err) // os.Exit(1) // } // // # Will write to stdout and then exit // p := properties.MustLoadFile("config.properties") // // Properties can also be loaded into a struct via the `Decode` // method, e.g. // // type S struct { // A string `properties:"a,default=foo"` // D time.Duration `properties:"timeout,default=5s"` // E time.Time `properties:"expires,layout=2006-01-02,default=2015-01-01"` // } // // See `Decode()` method for the full documentation. // // The following documents provide a description of the properties // file format. // // http://en.wikipedia.org/wiki/.properties // // http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29 // package properties
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/.travis.yml
language: go go: - 1.3.x - 1.4.x - 1.5.x - 1.6.x - 1.7.x - 1.8.x - 1.9.x - "1.10.x" - "1.11.x" - "1.12.x" - "1.13.x" - "1.14.x" - "1.15.x" - "1.16.x" - tip
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/properties.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package properties // BUG(frank): Set() does not check for invalid unicode literals since this is currently handled by the lexer. // BUG(frank): Write() does not allow to configure the newline character. Therefore, on Windows LF is used. import ( "bytes" "fmt" "io" "log" "os" "regexp" "sort" "strconv" "strings" "time" "unicode/utf8" ) const maxExpansionDepth = 64 // ErrorHandlerFunc defines the type of function which handles failures // of the MustXXX() functions. An error handler function must exit // the application after handling the error. type ErrorHandlerFunc func(error) // ErrorHandler is the function which handles failures of the MustXXX() // functions. The default is LogFatalHandler. var ErrorHandler ErrorHandlerFunc = LogFatalHandler // LogHandlerFunc defines the function prototype for logging errors. type LogHandlerFunc func(fmt string, args ...interface{}) // LogPrintf defines a log handler which uses log.Printf. var LogPrintf LogHandlerFunc = log.Printf // LogFatalHandler handles the error by logging a fatal error and exiting. func LogFatalHandler(err error) { log.Fatal(err) } // PanicHandler handles the error by panicking. func PanicHandler(err error) { panic(err) } // ----------------------------------------------------------------------------- // A Properties contains the key/value pairs from the properties input. // All values are stored in unexpanded form and are expanded at runtime type Properties struct { // Pre-/Postfix for property expansion. Prefix string Postfix string // DisableExpansion controls the expansion of properties on Get() // and the check for circular references on Set(). When set to // true Properties behaves like a simple key/value store and does // not check for circular references on Get() or on Set(). DisableExpansion bool // Stores the key/value pairs m map[string]string // Stores the comments per key. c map[string][]string // Stores the keys in order of appearance. k []string // WriteSeparator specifies the separator of key and value while writing the properties. WriteSeparator string } // NewProperties creates a new Properties struct with the default // configuration for "${key}" expressions. func NewProperties() *Properties { return &Properties{ Prefix: "${", Postfix: "}", m: map[string]string{}, c: map[string][]string{}, k: []string{}, } } // Load reads a buffer into the given Properties struct. func (p *Properties) Load(buf []byte, enc Encoding) error { l := &Loader{Encoding: enc, DisableExpansion: p.DisableExpansion} newProperties, err := l.LoadBytes(buf) if err != nil { return err } p.Merge(newProperties) return nil } // Get returns the expanded value for the given key if exists. // Otherwise, ok is false. func (p *Properties) Get(key string) (value string, ok bool) { v, ok := p.m[key] if p.DisableExpansion { return v, ok } if !ok { return "", false } expanded, err := p.expand(key, v) // we guarantee that the expanded value is free of // circular references and malformed expressions // so we panic if we still get an error here. if err != nil { ErrorHandler(err) } return expanded, true } // MustGet returns the expanded value for the given key if exists. // Otherwise, it panics. func (p *Properties) MustGet(key string) string { if v, ok := p.Get(key); ok { return v } ErrorHandler(invalidKeyError(key)) panic("ErrorHandler should exit") } // ---------------------------------------------------------------------------- // ClearComments removes the comments for all keys. func (p *Properties) ClearComments() { p.c = map[string][]string{} } // ---------------------------------------------------------------------------- // GetComment returns the last comment before the given key or an empty string. func (p *Properties) GetComment(key string) string { comments, ok := p.c[key] if !ok || len(comments) == 0 { return "" } return comments[len(comments)-1] } // ---------------------------------------------------------------------------- // GetComments returns all comments that appeared before the given key or nil. func (p *Properties) GetComments(key string) []string { if comments, ok := p.c[key]; ok { return comments } return nil } // ---------------------------------------------------------------------------- // SetComment sets the comment for the key. func (p *Properties) SetComment(key, comment string) { p.c[key] = []string{comment} } // ---------------------------------------------------------------------------- // SetComments sets the comments for the key. If the comments are nil then // all comments for this key are deleted. func (p *Properties) SetComments(key string, comments []string) { if comments == nil { delete(p.c, key) return } p.c[key] = comments } // ---------------------------------------------------------------------------- // GetBool checks if the expanded value is one of '1', 'yes', // 'true' or 'on' if the key exists. The comparison is case-insensitive. // If the key does not exist the default value is returned. func (p *Properties) GetBool(key string, def bool) bool { v, err := p.getBool(key) if err != nil { return def } return v } // MustGetBool checks if the expanded value is one of '1', 'yes', // 'true' or 'on' if the key exists. The comparison is case-insensitive. // If the key does not exist the function panics. func (p *Properties) MustGetBool(key string) bool { v, err := p.getBool(key) if err != nil { ErrorHandler(err) } return v } func (p *Properties) getBool(key string) (value bool, err error) { if v, ok := p.Get(key); ok { return boolVal(v), nil } return false, invalidKeyError(key) } func boolVal(v string) bool { v = strings.ToLower(v) return v == "1" || v == "true" || v == "yes" || v == "on" } // ---------------------------------------------------------------------------- // GetDuration parses the expanded value as an time.Duration (in ns) if the // key exists. If key does not exist or the value cannot be parsed the default // value is returned. In almost all cases you want to use GetParsedDuration(). func (p *Properties) GetDuration(key string, def time.Duration) time.Duration { v, err := p.getInt64(key) if err != nil { return def } return time.Duration(v) } // MustGetDuration parses the expanded value as an time.Duration (in ns) if // the key exists. If key does not exist or the value cannot be parsed the // function panics. In almost all cases you want to use MustGetParsedDuration(). func (p *Properties) MustGetDuration(key string) time.Duration { v, err := p.getInt64(key) if err != nil { ErrorHandler(err) } return time.Duration(v) } // ---------------------------------------------------------------------------- // GetParsedDuration parses the expanded value with time.ParseDuration() if the key exists. // If key does not exist or the value cannot be parsed the default // value is returned. func (p *Properties) GetParsedDuration(key string, def time.Duration) time.Duration { s, ok := p.Get(key) if !ok { return def } v, err := time.ParseDuration(s) if err != nil { return def } return v } // MustGetParsedDuration parses the expanded value with time.ParseDuration() if the key exists. // If key does not exist or the value cannot be parsed the function panics. func (p *Properties) MustGetParsedDuration(key string) time.Duration { s, ok := p.Get(key) if !ok { ErrorHandler(invalidKeyError(key)) } v, err := time.ParseDuration(s) if err != nil { ErrorHandler(err) } return v } // ---------------------------------------------------------------------------- // GetFloat64 parses the expanded value as a float64 if the key exists. // If key does not exist or the value cannot be parsed the default // value is returned. func (p *Properties) GetFloat64(key string, def float64) float64 { v, err := p.getFloat64(key) if err != nil { return def } return v } // MustGetFloat64 parses the expanded value as a float64 if the key exists. // If key does not exist or the value cannot be parsed the function panics. func (p *Properties) MustGetFloat64(key string) float64 { v, err := p.getFloat64(key) if err != nil { ErrorHandler(err) } return v } func (p *Properties) getFloat64(key string) (value float64, err error) { if v, ok := p.Get(key); ok { value, err = strconv.ParseFloat(v, 64) if err != nil { return 0, err } return value, nil } return 0, invalidKeyError(key) } // ---------------------------------------------------------------------------- // GetInt parses the expanded value as an int if the key exists. // If key does not exist or the value cannot be parsed the default // value is returned. If the value does not fit into an int the // function panics with an out of range error. func (p *Properties) GetInt(key string, def int) int { v, err := p.getInt64(key) if err != nil { return def } return intRangeCheck(key, v) } // MustGetInt parses the expanded value as an int if the key exists. // If key does not exist or the value cannot be parsed the function panics. // If the value does not fit into an int the function panics with // an out of range error. func (p *Properties) MustGetInt(key string) int { v, err := p.getInt64(key) if err != nil { ErrorHandler(err) } return intRangeCheck(key, v) } // ---------------------------------------------------------------------------- // GetInt64 parses the expanded value as an int64 if the key exists. // If key does not exist or the value cannot be parsed the default // value is returned. func (p *Properties) GetInt64(key string, def int64) int64 { v, err := p.getInt64(key) if err != nil { return def } return v } // MustGetInt64 parses the expanded value as an int if the key exists. // If key does not exist or the value cannot be parsed the function panics. func (p *Properties) MustGetInt64(key string) int64 { v, err := p.getInt64(key) if err != nil { ErrorHandler(err) } return v } func (p *Properties) getInt64(key string) (value int64, err error) { if v, ok := p.Get(key); ok { value, err = strconv.ParseInt(v, 10, 64) if err != nil { return 0, err } return value, nil } return 0, invalidKeyError(key) } // ---------------------------------------------------------------------------- // GetUint parses the expanded value as an uint if the key exists. // If key does not exist or the value cannot be parsed the default // value is returned. If the value does not fit into an int the // function panics with an out of range error. func (p *Properties) GetUint(key string, def uint) uint { v, err := p.getUint64(key) if err != nil { return def } return uintRangeCheck(key, v) } // MustGetUint parses the expanded value as an int if the key exists. // If key does not exist or the value cannot be parsed the function panics. // If the value does not fit into an int the function panics with // an out of range error. func (p *Properties) MustGetUint(key string) uint { v, err := p.getUint64(key) if err != nil { ErrorHandler(err) } return uintRangeCheck(key, v) } // ---------------------------------------------------------------------------- // GetUint64 parses the expanded value as an uint64 if the key exists. // If key does not exist or the value cannot be parsed the default // value is returned. func (p *Properties) GetUint64(key string, def uint64) uint64 { v, err := p.getUint64(key) if err != nil { return def } return v } // MustGetUint64 parses the expanded value as an int if the key exists. // If key does not exist or the value cannot be parsed the function panics. func (p *Properties) MustGetUint64(key string) uint64 { v, err := p.getUint64(key) if err != nil { ErrorHandler(err) } return v } func (p *Properties) getUint64(key string) (value uint64, err error) { if v, ok := p.Get(key); ok { value, err = strconv.ParseUint(v, 10, 64) if err != nil { return 0, err } return value, nil } return 0, invalidKeyError(key) } // ---------------------------------------------------------------------------- // GetString returns the expanded value for the given key if exists or // the default value otherwise. func (p *Properties) GetString(key, def string) string { if v, ok := p.Get(key); ok { return v } return def } // MustGetString returns the expanded value for the given key if exists or // panics otherwise. func (p *Properties) MustGetString(key string) string { if v, ok := p.Get(key); ok { return v } ErrorHandler(invalidKeyError(key)) panic("ErrorHandler should exit") } // ---------------------------------------------------------------------------- // Filter returns a new properties object which contains all properties // for which the key matches the pattern. func (p *Properties) Filter(pattern string) (*Properties, error) { re, err := regexp.Compile(pattern) if err != nil { return nil, err } return p.FilterRegexp(re), nil } // FilterRegexp returns a new properties object which contains all properties // for which the key matches the regular expression. func (p *Properties) FilterRegexp(re *regexp.Regexp) *Properties { pp := NewProperties() for _, k := range p.k { if re.MatchString(k) { // TODO(fs): we are ignoring the error which flags a circular reference. // TODO(fs): since we are just copying a subset of keys this cannot happen (fingers crossed) pp.Set(k, p.m[k]) } } return pp } // FilterPrefix returns a new properties object with a subset of all keys // with the given prefix. func (p *Properties) FilterPrefix(prefix string) *Properties { pp := NewProperties() for _, k := range p.k { if strings.HasPrefix(k, prefix) { // TODO(fs): we are ignoring the error which flags a circular reference. // TODO(fs): since we are just copying a subset of keys this cannot happen (fingers crossed) pp.Set(k, p.m[k]) } } return pp } // FilterStripPrefix returns a new properties object with a subset of all keys // with the given prefix and the prefix removed from the keys. func (p *Properties) FilterStripPrefix(prefix string) *Properties { pp := NewProperties() n := len(prefix) for _, k := range p.k { if len(k) > len(prefix) && strings.HasPrefix(k, prefix) { // TODO(fs): we are ignoring the error which flags a circular reference. // TODO(fs): since we are modifying keys I am not entirely sure whether we can create a circular reference // TODO(fs): this function should probably return an error but the signature is fixed pp.Set(k[n:], p.m[k]) } } return pp } // Len returns the number of keys. func (p *Properties) Len() int { return len(p.m) } // Keys returns all keys in the same order as in the input. func (p *Properties) Keys() []string { keys := make([]string, len(p.k)) copy(keys, p.k) return keys } // Set sets the property key to the corresponding value. // If a value for key existed before then ok is true and prev // contains the previous value. If the value contains a // circular reference or a malformed expression then // an error is returned. // An empty key is silently ignored. func (p *Properties) Set(key, value string) (prev string, ok bool, err error) { if key == "" { return "", false, nil } // if expansion is disabled we allow circular references if p.DisableExpansion { prev, ok = p.Get(key) p.m[key] = value if !ok { p.k = append(p.k, key) } return prev, ok, nil } // to check for a circular reference we temporarily need // to set the new value. If there is an error then revert // to the previous state. Only if all tests are successful // then we add the key to the p.k list. prev, ok = p.Get(key) p.m[key] = value // now check for a circular reference _, err = p.expand(key, value) if err != nil { // revert to the previous state if ok { p.m[key] = prev } else { delete(p.m, key) } return "", false, err } if !ok { p.k = append(p.k, key) } return prev, ok, nil } // SetValue sets property key to the default string value // as defined by fmt.Sprintf("%v"). func (p *Properties) SetValue(key string, value interface{}) error { _, _, err := p.Set(key, fmt.Sprintf("%v", value)) return err } // MustSet sets the property key to the corresponding value. // If a value for key existed before then ok is true and prev // contains the previous value. An empty key is silently ignored. func (p *Properties) MustSet(key, value string) (prev string, ok bool) { prev, ok, err := p.Set(key, value) if err != nil { ErrorHandler(err) } return prev, ok } // String returns a string of all expanded 'key = value' pairs. func (p *Properties) String() string { var s string for _, key := range p.k { value, _ := p.Get(key) s = fmt.Sprintf("%s%s = %s\n", s, key, value) } return s } // Sort sorts the properties keys in alphabetical order. // This is helpfully before writing the properties. func (p *Properties) Sort() { sort.Strings(p.k) } // Write writes all unexpanded 'key = value' pairs to the given writer. // Write returns the number of bytes written and any write error encountered. func (p *Properties) Write(w io.Writer, enc Encoding) (n int, err error) { return p.WriteComment(w, "", enc) } // WriteComment writes all unexpanced 'key = value' pairs to the given writer. // If prefix is not empty then comments are written with a blank line and the // given prefix. The prefix should be either "# " or "! " to be compatible with // the properties file format. Otherwise, the properties parser will not be // able to read the file back in. It returns the number of bytes written and // any write error encountered. func (p *Properties) WriteComment(w io.Writer, prefix string, enc Encoding) (n int, err error) { var x int for _, key := range p.k { value := p.m[key] if prefix != "" { if comments, ok := p.c[key]; ok { // don't print comments if they are all empty allEmpty := true for _, c := range comments { if c != "" { allEmpty = false break } } if !allEmpty { // add a blank line between entries but not at the top if len(comments) > 0 && n > 0 { x, err = fmt.Fprintln(w) if err != nil { return } n += x } for _, c := range comments { x, err = fmt.Fprintf(w, "%s%s\n", prefix, c) if err != nil { return } n += x } } } } sep := " = " if p.WriteSeparator != "" { sep = p.WriteSeparator } x, err = fmt.Fprintf(w, "%s%s%s\n", encode(key, " :", enc), sep, encode(value, "", enc)) if err != nil { return } n += x } return } // Map returns a copy of the properties as a map. func (p *Properties) Map() map[string]string { m := make(map[string]string) for k, v := range p.m { m[k] = v } return m } // FilterFunc returns a copy of the properties which includes the values which passed all filters. func (p *Properties) FilterFunc(filters ...func(k, v string) bool) *Properties { pp := NewProperties() outer: for k, v := range p.m { for _, f := range filters { if !f(k, v) { continue outer } pp.Set(k, v) } } return pp } // ---------------------------------------------------------------------------- // Delete removes the key and its comments. func (p *Properties) Delete(key string) { delete(p.m, key) delete(p.c, key) newKeys := []string{} for _, k := range p.k { if k != key { newKeys = append(newKeys, k) } } p.k = newKeys } // Merge merges properties, comments and keys from other *Properties into p func (p *Properties) Merge(other *Properties) { for k, v := range other.m { p.m[k] = v } for k, v := range other.c { p.c[k] = v } outer: for _, otherKey := range other.k { for _, key := range p.k { if otherKey == key { continue outer } } p.k = append(p.k, otherKey) } } // ---------------------------------------------------------------------------- // check expands all values and returns an error if a circular reference or // a malformed expression was found. func (p *Properties) check() error { for key, value := range p.m { if _, err := p.expand(key, value); err != nil { return err } } return nil } func (p *Properties) expand(key, input string) (string, error) { // no pre/postfix -> nothing to expand if p.Prefix == "" && p.Postfix == "" { return input, nil } return expand(input, []string{key}, p.Prefix, p.Postfix, p.m) } // expand recursively expands expressions of '(prefix)key(postfix)' to their corresponding values. // The function keeps track of the keys that were already expanded and stops if it // detects a circular reference or a malformed expression of the form '(prefix)key'. func expand(s string, keys []string, prefix, postfix string, values map[string]string) (string, error) { if len(keys) > maxExpansionDepth { return "", fmt.Errorf("expansion too deep") } for { start := strings.Index(s, prefix) if start == -1 { return s, nil } keyStart := start + len(prefix) keyLen := strings.Index(s[keyStart:], postfix) if keyLen == -1 { return "", fmt.Errorf("malformed expression") } end := keyStart + keyLen + len(postfix) - 1 key := s[keyStart : keyStart+keyLen] // fmt.Printf("s:%q pp:%q start:%d end:%d keyStart:%d keyLen:%d key:%q\n", s, prefix + "..." + postfix, start, end, keyStart, keyLen, key) for _, k := range keys { if key == k { var b bytes.Buffer b.WriteString("circular reference in:\n") for _, k1 := range keys { fmt.Fprintf(&b, "%s=%s\n", k1, values[k1]) } return "", fmt.Errorf(b.String()) } } val, ok := values[key] if !ok { val = os.Getenv(key) } new_val, err := expand(val, append(keys, key), prefix, postfix, values) if err != nil { return "", err } s = s[:start] + new_val + s[end+1:] } return s, nil } // encode encodes a UTF-8 string to ISO-8859-1 and escapes some characters. func encode(s string, special string, enc Encoding) string { switch enc { case UTF8: return encodeUtf8(s, special) case ISO_8859_1: return encodeIso(s, special) default: panic(fmt.Sprintf("unsupported encoding %v", enc)) } } func encodeUtf8(s string, special string) string { v := "" for pos := 0; pos < len(s); { r, w := utf8.DecodeRuneInString(s[pos:]) pos += w v += escape(r, special) } return v } func encodeIso(s string, special string) string { var r rune var w int var v string for pos := 0; pos < len(s); { switch r, w = utf8.DecodeRuneInString(s[pos:]); { case r < 1<<8: // single byte rune -> escape special chars only v += escape(r, special) case r < 1<<16: // two byte rune -> unicode literal v += fmt.Sprintf("\\u%04x", r) default: // more than two bytes per rune -> can't encode v += "?" } pos += w } return v } func escape(r rune, special string) string { switch r { case '\f': return "\\f" case '\n': return "\\n" case '\r': return "\\r" case '\t': return "\\t" case '\\': return "\\\\" default: if strings.ContainsRune(special, r) { return "\\" + string(r) } return string(r) } } func invalidKeyError(key string) error { return fmt.Errorf("unknown property: %s", key) }
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/lex.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Parts of the lexer are from the template/text/parser package // For these parts the following applies: // // Copyright 2011 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 of the go 1.2 // distribution. package properties import ( "fmt" "strconv" "strings" "unicode/utf8" ) // item represents a token or text string returned from the scanner. type item struct { typ itemType // The type of this item. pos int // The starting position, in bytes, of this item in the input string. val string // The value of this item. } func (i item) String() string { switch { case i.typ == itemEOF: return "EOF" case i.typ == itemError: return i.val case len(i.val) > 10: return fmt.Sprintf("%.10q...", i.val) } return fmt.Sprintf("%q", i.val) } // itemType identifies the type of lex items. type itemType int const ( itemError itemType = iota // error occurred; value is text of error itemEOF itemKey // a key itemValue // a value itemComment // a comment ) // defines a constant for EOF const eof = -1 // permitted whitespace characters space, FF and TAB const whitespace = " \f\t" // stateFn represents the state of the scanner as a function that returns the next state. type stateFn func(*lexer) stateFn // lexer holds the state of the scanner. type lexer struct { input string // the string being scanned state stateFn // the next lexing function to enter pos int // current position in the input start int // start position of this item width int // width of last rune read from input lastPos int // position of most recent item returned by nextItem runes []rune // scanned runes for this item items chan item // channel of scanned items } // next returns the next rune in the input. func (l *lexer) next() rune { if l.pos >= len(l.input) { l.width = 0 return eof } r, w := utf8.DecodeRuneInString(l.input[l.pos:]) l.width = w l.pos += l.width return r } // peek returns but does not consume the next rune in the input. func (l *lexer) peek() rune { r := l.next() l.backup() return r } // backup steps back one rune. Can only be called once per call of next. func (l *lexer) backup() { l.pos -= l.width } // emit passes an item back to the client. func (l *lexer) emit(t itemType) { i := item{t, l.start, string(l.runes)} l.items <- i l.start = l.pos l.runes = l.runes[:0] } // ignore skips over the pending input before this point. func (l *lexer) ignore() { l.start = l.pos } // appends the rune to the current value func (l *lexer) appendRune(r rune) { l.runes = append(l.runes, r) } // accept consumes the next rune if it's from the valid set. func (l *lexer) accept(valid string) bool { if strings.ContainsRune(valid, l.next()) { return true } l.backup() return false } // acceptRun consumes a run of runes from the valid set. func (l *lexer) acceptRun(valid string) { for strings.ContainsRune(valid, l.next()) { } l.backup() } // acceptRunUntil consumes a run of runes up to a terminator. func (l *lexer) acceptRunUntil(term rune) { for term != l.next() { } l.backup() } // hasText returns true if the current parsed text is not empty. func (l *lexer) isNotEmpty() bool { return l.pos > l.start } // lineNumber reports which line we're on, based on the position of // the previous item returned by nextItem. Doing it this way // means we don't have to worry about peek double counting. func (l *lexer) lineNumber() int { return 1 + strings.Count(l.input[:l.lastPos], "\n") } // errorf returns an error token and terminates the scan by passing // back a nil pointer that will be the next state, terminating l.nextItem. func (l *lexer) errorf(format string, args ...interface{}) stateFn { l.items <- item{itemError, l.start, fmt.Sprintf(format, args...)} return nil } // nextItem returns the next item from the input. func (l *lexer) nextItem() item { i := <-l.items l.lastPos = i.pos return i } // lex creates a new scanner for the input string. func lex(input string) *lexer { l := &lexer{ input: input, items: make(chan item), runes: make([]rune, 0, 32), } go l.run() return l } // run runs the state machine for the lexer. func (l *lexer) run() { for l.state = lexBeforeKey(l); l.state != nil; { l.state = l.state(l) } } // state functions // lexBeforeKey scans until a key begins. func lexBeforeKey(l *lexer) stateFn { switch r := l.next(); { case isEOF(r): l.emit(itemEOF) return nil case isEOL(r): l.ignore() return lexBeforeKey case isComment(r): return lexComment case isWhitespace(r): l.ignore() return lexBeforeKey default: l.backup() return lexKey } } // lexComment scans a comment line. The comment character has already been scanned. func lexComment(l *lexer) stateFn { l.acceptRun(whitespace) l.ignore() for { switch r := l.next(); { case isEOF(r): l.ignore() l.emit(itemEOF) return nil case isEOL(r): l.emit(itemComment) return lexBeforeKey default: l.appendRune(r) } } } // lexKey scans the key up to a delimiter func lexKey(l *lexer) stateFn { var r rune Loop: for { switch r = l.next(); { case isEscape(r): err := l.scanEscapeSequence() if err != nil { return l.errorf(err.Error()) } case isEndOfKey(r): l.backup() break Loop case isEOF(r): break Loop default: l.appendRune(r) } } if len(l.runes) > 0 { l.emit(itemKey) } if isEOF(r) { l.emit(itemEOF) return nil } return lexBeforeValue } // lexBeforeValue scans the delimiter between key and value. // Leading and trailing whitespace is ignored. // We expect to be just after the key. func lexBeforeValue(l *lexer) stateFn { l.acceptRun(whitespace) l.accept(":=") l.acceptRun(whitespace) l.ignore() return lexValue } // lexValue scans text until the end of the line. We expect to be just after the delimiter. func lexValue(l *lexer) stateFn { for { switch r := l.next(); { case isEscape(r): if isEOL(l.peek()) { l.next() l.acceptRun(whitespace) } else { err := l.scanEscapeSequence() if err != nil { return l.errorf(err.Error()) } } case isEOL(r): l.emit(itemValue) l.ignore() return lexBeforeKey case isEOF(r): l.emit(itemValue) l.emit(itemEOF) return nil default: l.appendRune(r) } } } // scanEscapeSequence scans either one of the escaped characters // or a unicode literal. We expect to be after the escape character. func (l *lexer) scanEscapeSequence() error { switch r := l.next(); { case isEscapedCharacter(r): l.appendRune(decodeEscapedCharacter(r)) return nil case atUnicodeLiteral(r): return l.scanUnicodeLiteral() case isEOF(r): return fmt.Errorf("premature EOF") // silently drop the escape character and append the rune as is default: l.appendRune(r) return nil } } // scans a unicode literal in the form \uXXXX. We expect to be after the \u. func (l *lexer) scanUnicodeLiteral() error { // scan the digits d := make([]rune, 4) for i := 0; i < 4; i++ { d[i] = l.next() if d[i] == eof || !strings.ContainsRune("0123456789abcdefABCDEF", d[i]) { return fmt.Errorf("invalid unicode literal") } } // decode the digits into a rune r, err := strconv.ParseInt(string(d), 16, 0) if err != nil { return err } l.appendRune(rune(r)) return nil } // decodeEscapedCharacter returns the unescaped rune. We expect to be after the escape character. func decodeEscapedCharacter(r rune) rune { switch r { case 'f': return '\f' case 'n': return '\n' case 'r': return '\r' case 't': return '\t' default: return r } } // atUnicodeLiteral reports whether we are at a unicode literal. // The escape character has already been consumed. func atUnicodeLiteral(r rune) bool { return r == 'u' } // isComment reports whether we are at the start of a comment. func isComment(r rune) bool { return r == '#' || r == '!' } // isEndOfKey reports whether the rune terminates the current key. func isEndOfKey(r rune) bool { return strings.ContainsRune(" \f\t\r\n:=", r) } // isEOF reports whether we are at EOF. func isEOF(r rune) bool { return r == eof } // isEOL reports whether we are at a new line character. func isEOL(r rune) bool { return r == '\n' || r == '\r' } // isEscape reports whether the rune is the escape character which // prefixes unicode literals and other escaped characters. func isEscape(r rune) bool { return r == '\\' } // isEscapedCharacter reports whether we are at one of the characters that need escaping. // The escape character has already been consumed. func isEscapedCharacter(r rune) bool { return strings.ContainsRune(" :=fnrt", r) } // isWhitespace reports whether the rune is a whitespace character. func isWhitespace(r rune) bool { return strings.ContainsRune(whitespace, r) }
0
rapidsai_public_repos/roc/vendor/github.com/magiconair
rapidsai_public_repos/roc/vendor/github.com/magiconair/properties/rangecheck.go
// Copyright 2018 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package properties import ( "fmt" "math" ) // make this a var to overwrite it in a test var is32Bit = ^uint(0) == math.MaxUint32 // intRangeCheck checks if the value fits into the int type and // panics if it does not. func intRangeCheck(key string, v int64) int { if is32Bit && (v < math.MinInt32 || v > math.MaxInt32) { panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) } return int(v) } // uintRangeCheck checks if the value fits into the uint type and // panics if it does not. func uintRangeCheck(key string, v uint64) uint { if is32Bit && v > math.MaxUint32 { panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) } return uint(v) }
0
rapidsai_public_repos/roc/vendor/google.golang.org
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/urlfetch/urlfetch.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // Package urlfetch provides an http.RoundTripper implementation // for fetching URLs via App Engine's urlfetch service. package urlfetch // import "google.golang.org/appengine/urlfetch" import ( "errors" "fmt" "io" "io/ioutil" "net/http" "net/url" "strconv" "strings" "time" "github.com/golang/protobuf/proto" "golang.org/x/net/context" "google.golang.org/appengine/internal" pb "google.golang.org/appengine/internal/urlfetch" ) // Transport is an implementation of http.RoundTripper for // App Engine. Users should generally create an http.Client using // this transport and use the Client rather than using this transport // directly. type Transport struct { Context context.Context // Controls whether the application checks the validity of SSL certificates // over HTTPS connections. A value of false (the default) instructs the // application to send a request to the server only if the certificate is // valid and signed by a trusted certificate authority (CA), and also // includes a hostname that matches the certificate. A value of true // instructs the application to perform no certificate validation. AllowInvalidServerCertificate bool } // Verify statically that *Transport implements http.RoundTripper. var _ http.RoundTripper = (*Transport)(nil) // Client returns an *http.Client using a default urlfetch Transport. This // client will have the default deadline of 5 seconds, and will check the // validity of SSL certificates. // // Any deadline of the provided context will be used for requests through this client; // if the client does not have a deadline then a 5 second default is used. func Client(ctx context.Context) *http.Client { return &http.Client{ Transport: &Transport{ Context: ctx, }, } } type bodyReader struct { content []byte truncated bool closed bool } // ErrTruncatedBody is the error returned after the final Read() from a // response's Body if the body has been truncated by App Engine's proxy. var ErrTruncatedBody = errors.New("urlfetch: truncated body") func statusCodeToText(code int) string { if t := http.StatusText(code); t != "" { return t } return strconv.Itoa(code) } func (br *bodyReader) Read(p []byte) (n int, err error) { if br.closed { if br.truncated { return 0, ErrTruncatedBody } return 0, io.EOF } n = copy(p, br.content) if n > 0 { br.content = br.content[n:] return } if br.truncated { br.closed = true return 0, ErrTruncatedBody } return 0, io.EOF } func (br *bodyReader) Close() error { br.closed = true br.content = nil return nil } // A map of the URL Fetch-accepted methods that take a request body. var methodAcceptsRequestBody = map[string]bool{ "POST": true, "PUT": true, "PATCH": true, } // urlString returns a valid string given a URL. This function is necessary because // the String method of URL doesn't correctly handle URLs with non-empty Opaque values. // See http://code.google.com/p/go/issues/detail?id=4860. func urlString(u *url.URL) string { if u.Opaque == "" || strings.HasPrefix(u.Opaque, "//") { return u.String() } aux := *u aux.Opaque = "//" + aux.Host + aux.Opaque return aux.String() } // RoundTrip issues a single HTTP request and returns its response. Per the // http.RoundTripper interface, RoundTrip only returns an error if there // was an unsupported request or the URL Fetch proxy fails. // Note that HTTP response codes such as 5xx, 403, 404, etc are not // errors as far as the transport is concerned and will be returned // with err set to nil. func (t *Transport) RoundTrip(req *http.Request) (res *http.Response, err error) { methNum, ok := pb.URLFetchRequest_RequestMethod_value[req.Method] if !ok { return nil, fmt.Errorf("urlfetch: unsupported HTTP method %q", req.Method) } method := pb.URLFetchRequest_RequestMethod(methNum) freq := &pb.URLFetchRequest{ Method: &method, Url: proto.String(urlString(req.URL)), FollowRedirects: proto.Bool(false), // http.Client's responsibility MustValidateServerCertificate: proto.Bool(!t.AllowInvalidServerCertificate), } if deadline, ok := t.Context.Deadline(); ok { freq.Deadline = proto.Float64(deadline.Sub(time.Now()).Seconds()) } for k, vals := range req.Header { for _, val := range vals { freq.Header = append(freq.Header, &pb.URLFetchRequest_Header{ Key: proto.String(k), Value: proto.String(val), }) } } if methodAcceptsRequestBody[req.Method] && req.Body != nil { // Avoid a []byte copy if req.Body has a Bytes method. switch b := req.Body.(type) { case interface { Bytes() []byte }: freq.Payload = b.Bytes() default: freq.Payload, err = ioutil.ReadAll(req.Body) if err != nil { return nil, err } } } fres := &pb.URLFetchResponse{} if err := internal.Call(t.Context, "urlfetch", "Fetch", freq, fres); err != nil { return nil, err } res = &http.Response{} res.StatusCode = int(*fres.StatusCode) res.Status = fmt.Sprintf("%d %s", res.StatusCode, statusCodeToText(res.StatusCode)) res.Header = make(http.Header) res.Request = req // Faked: res.ProtoMajor = 1 res.ProtoMinor = 1 res.Proto = "HTTP/1.1" res.Close = true for _, h := range fres.Header { hkey := http.CanonicalHeaderKey(*h.Key) hval := *h.Value if hkey == "Content-Length" { // Will get filled in below for all but HEAD requests. if req.Method == "HEAD" { res.ContentLength, _ = strconv.ParseInt(hval, 10, 64) } continue } res.Header.Add(hkey, hval) } if req.Method != "HEAD" { res.ContentLength = int64(len(fres.Content)) } truncated := fres.GetContentWasTruncated() res.Body = &bodyReader{content: fres.Content, truncated: truncated} return } func init() { internal.RegisterErrorCodeMap("urlfetch", pb.URLFetchServiceError_ErrorCode_name) internal.RegisterTimeoutErrorCode("urlfetch", int32(pb.URLFetchServiceError_DEADLINE_EXCEEDED)) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/api.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // +build !appengine package internal import ( "bytes" "errors" "fmt" "io/ioutil" "log" "net" "net/http" "net/url" "os" "runtime" "strconv" "strings" "sync" "sync/atomic" "time" "github.com/golang/protobuf/proto" netcontext "golang.org/x/net/context" basepb "google.golang.org/appengine/internal/base" logpb "google.golang.org/appengine/internal/log" remotepb "google.golang.org/appengine/internal/remote_api" ) const ( apiPath = "/rpc_http" defaultTicketSuffix = "/default.20150612t184001.0" ) var ( // Incoming headers. ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket") dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo") traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context") curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace") userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP") remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr") devRequestIdHeader = http.CanonicalHeaderKey("X-Appengine-Dev-Request-Id") // Outgoing headers. apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint") apiEndpointHeaderValue = []string{"app-engine-apis"} apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method") apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"} apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline") apiContentType = http.CanonicalHeaderKey("Content-Type") apiContentTypeValue = []string{"application/octet-stream"} logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count") apiHTTPClient = &http.Client{ Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, Dial: limitDial, MaxIdleConns: 1000, MaxIdleConnsPerHost: 10000, IdleConnTimeout: 90 * time.Second, }, } defaultTicketOnce sync.Once defaultTicket string backgroundContextOnce sync.Once backgroundContext netcontext.Context ) func apiURL() *url.URL { host, port := "appengine.googleapis.internal", "10001" if h := os.Getenv("API_HOST"); h != "" { host = h } if p := os.Getenv("API_PORT"); p != "" { port = p } return &url.URL{ Scheme: "http", Host: host + ":" + port, Path: apiPath, } } func handleHTTP(w http.ResponseWriter, r *http.Request) { c := &context{ req: r, outHeader: w.Header(), apiURL: apiURL(), } r = r.WithContext(withContext(r.Context(), c)) c.req = r stopFlushing := make(chan int) // Patch up RemoteAddr so it looks reasonable. if addr := r.Header.Get(userIPHeader); addr != "" { r.RemoteAddr = addr } else if addr = r.Header.Get(remoteAddrHeader); addr != "" { r.RemoteAddr = addr } else { // Should not normally reach here, but pick a sensible default anyway. r.RemoteAddr = "127.0.0.1" } // The address in the headers will most likely be of these forms: // 123.123.123.123 // 2001:db8::1 // net/http.Request.RemoteAddr is specified to be in "IP:port" form. if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil { // Assume the remote address is only a host; add a default port. r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80") } // Start goroutine responsible for flushing app logs. // This is done after adding c to ctx.m (and stopped before removing it) // because flushing logs requires making an API call. go c.logFlusher(stopFlushing) executeRequestSafely(c, r) c.outHeader = nil // make sure header changes aren't respected any more stopFlushing <- 1 // any logging beyond this point will be dropped // Flush any pending logs asynchronously. c.pendingLogs.Lock() flushes := c.pendingLogs.flushes if len(c.pendingLogs.lines) > 0 { flushes++ } c.pendingLogs.Unlock() flushed := make(chan struct{}) go func() { defer close(flushed) // Force a log flush, because with very short requests we // may not ever flush logs. c.flushLog(true) }() w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) // Avoid nil Write call if c.Write is never called. if c.outCode != 0 { w.WriteHeader(c.outCode) } if c.outBody != nil { w.Write(c.outBody) } // Wait for the last flush to complete before returning, // otherwise the security ticket will not be valid. <-flushed } func executeRequestSafely(c *context, r *http.Request) { defer func() { if x := recover(); x != nil { logf(c, 4, "%s", renderPanic(x)) // 4 == critical c.outCode = 500 } }() http.DefaultServeMux.ServeHTTP(c, r) } func renderPanic(x interface{}) string { buf := make([]byte, 16<<10) // 16 KB should be plenty buf = buf[:runtime.Stack(buf, false)] // Remove the first few stack frames: // this func // the recover closure in the caller // That will root the stack trace at the site of the panic. const ( skipStart = "internal.renderPanic" skipFrames = 2 ) start := bytes.Index(buf, []byte(skipStart)) p := start for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ { p = bytes.IndexByte(buf[p+1:], '\n') + p + 1 if p < 0 { break } } if p >= 0 { // buf[start:p+1] is the block to remove. // Copy buf[p+1:] over buf[start:] and shrink buf. copy(buf[start:], buf[p+1:]) buf = buf[:len(buf)-(p+1-start)] } // Add panic heading. head := fmt.Sprintf("panic: %v\n\n", x) if len(head) > len(buf) { // Extremely unlikely to happen. return head } copy(buf[len(head):], buf) copy(buf, head) return string(buf) } // context represents the context of an in-flight HTTP request. // It implements the appengine.Context and http.ResponseWriter interfaces. type context struct { req *http.Request outCode int outHeader http.Header outBody []byte pendingLogs struct { sync.Mutex lines []*logpb.UserAppLogLine flushes int } apiURL *url.URL } var contextKey = "holds a *context" // jointContext joins two contexts in a superficial way. // It takes values and timeouts from a base context, and only values from another context. type jointContext struct { base netcontext.Context valuesOnly netcontext.Context } func (c jointContext) Deadline() (time.Time, bool) { return c.base.Deadline() } func (c jointContext) Done() <-chan struct{} { return c.base.Done() } func (c jointContext) Err() error { return c.base.Err() } func (c jointContext) Value(key interface{}) interface{} { if val := c.base.Value(key); val != nil { return val } return c.valuesOnly.Value(key) } // fromContext returns the App Engine context or nil if ctx is not // derived from an App Engine context. func fromContext(ctx netcontext.Context) *context { c, _ := ctx.Value(&contextKey).(*context) return c } func withContext(parent netcontext.Context, c *context) netcontext.Context { ctx := netcontext.WithValue(parent, &contextKey, c) if ns := c.req.Header.Get(curNamespaceHeader); ns != "" { ctx = withNamespace(ctx, ns) } return ctx } func toContext(c *context) netcontext.Context { return withContext(netcontext.Background(), c) } func IncomingHeaders(ctx netcontext.Context) http.Header { if c := fromContext(ctx); c != nil { return c.req.Header } return nil } func ReqContext(req *http.Request) netcontext.Context { return req.Context() } func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context { return jointContext{ base: parent, valuesOnly: req.Context(), } } // DefaultTicket returns a ticket used for background context or dev_appserver. func DefaultTicket() string { defaultTicketOnce.Do(func() { if IsDevAppServer() { defaultTicket = "testapp" + defaultTicketSuffix return } appID := partitionlessAppID() escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1) majVersion := VersionID(nil) if i := strings.Index(majVersion, "."); i > 0 { majVersion = majVersion[:i] } defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID()) }) return defaultTicket } func BackgroundContext() netcontext.Context { backgroundContextOnce.Do(func() { // Compute background security ticket. ticket := DefaultTicket() c := &context{ req: &http.Request{ Header: http.Header{ ticketHeader: []string{ticket}, }, }, apiURL: apiURL(), } backgroundContext = toContext(c) // TODO(dsymonds): Wire up the shutdown handler to do a final flush. go c.logFlusher(make(chan int)) }) return backgroundContext } // RegisterTestRequest registers the HTTP request req for testing, such that // any API calls are sent to the provided URL. It returns a closure to delete // the registration. // It should only be used by aetest package. func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) { c := &context{ req: req, apiURL: apiURL, } ctx := withContext(decorate(req.Context()), c) req = req.WithContext(ctx) c.req = req return req, func() {} } var errTimeout = &CallError{ Detail: "Deadline exceeded", Code: int32(remotepb.RpcError_CANCELLED), Timeout: true, } func (c *context) Header() http.Header { return c.outHeader } // Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status // codes do not permit a response body (nor response entity headers such as // Content-Length, Content-Type, etc). func bodyAllowedForStatus(status int) bool { switch { case status >= 100 && status <= 199: return false case status == 204: return false case status == 304: return false } return true } func (c *context) Write(b []byte) (int, error) { if c.outCode == 0 { c.WriteHeader(http.StatusOK) } if len(b) > 0 && !bodyAllowedForStatus(c.outCode) { return 0, http.ErrBodyNotAllowed } c.outBody = append(c.outBody, b...) return len(b), nil } func (c *context) WriteHeader(code int) { if c.outCode != 0 { logf(c, 3, "WriteHeader called multiple times on request.") // error level return } c.outCode = code } func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) { hreq := &http.Request{ Method: "POST", URL: c.apiURL, Header: http.Header{ apiEndpointHeader: apiEndpointHeaderValue, apiMethodHeader: apiMethodHeaderValue, apiContentType: apiContentTypeValue, apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)}, }, Body: ioutil.NopCloser(bytes.NewReader(body)), ContentLength: int64(len(body)), Host: c.apiURL.Host, } if info := c.req.Header.Get(dapperHeader); info != "" { hreq.Header.Set(dapperHeader, info) } if info := c.req.Header.Get(traceHeader); info != "" { hreq.Header.Set(traceHeader, info) } tr := apiHTTPClient.Transport.(*http.Transport) var timedOut int32 // atomic; set to 1 if timed out t := time.AfterFunc(timeout, func() { atomic.StoreInt32(&timedOut, 1) tr.CancelRequest(hreq) }) defer t.Stop() defer func() { // Check if timeout was exceeded. if atomic.LoadInt32(&timedOut) != 0 { err = errTimeout } }() hresp, err := apiHTTPClient.Do(hreq) if err != nil { return nil, &CallError{ Detail: fmt.Sprintf("service bridge HTTP failed: %v", err), Code: int32(remotepb.RpcError_UNKNOWN), } } defer hresp.Body.Close() hrespBody, err := ioutil.ReadAll(hresp.Body) if hresp.StatusCode != 200 { return nil, &CallError{ Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody), Code: int32(remotepb.RpcError_UNKNOWN), } } if err != nil { return nil, &CallError{ Detail: fmt.Sprintf("service bridge response bad: %v", err), Code: int32(remotepb.RpcError_UNKNOWN), } } return hrespBody, nil } func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error { if ns := NamespaceFromContext(ctx); ns != "" { if fn, ok := NamespaceMods[service]; ok { fn(in, ns) } } if f, ctx, ok := callOverrideFromContext(ctx); ok { return f(ctx, service, method, in, out) } // Handle already-done contexts quickly. select { case <-ctx.Done(): return ctx.Err() default: } c := fromContext(ctx) if c == nil { // Give a good error message rather than a panic lower down. return errNotAppEngineContext } // Apply transaction modifications if we're in a transaction. if t := transactionFromContext(ctx); t != nil { if t.finished { return errors.New("transaction context has expired") } applyTransaction(in, &t.transaction) } // Default RPC timeout is 60s. timeout := 60 * time.Second if deadline, ok := ctx.Deadline(); ok { timeout = deadline.Sub(time.Now()) } data, err := proto.Marshal(in) if err != nil { return err } ticket := c.req.Header.Get(ticketHeader) // Use a test ticket under test environment. if ticket == "" { if appid := ctx.Value(&appIDOverrideKey); appid != nil { ticket = appid.(string) + defaultTicketSuffix } } // Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver. if ticket == "" { ticket = DefaultTicket() } if dri := c.req.Header.Get(devRequestIdHeader); IsDevAppServer() && dri != "" { ticket = dri } req := &remotepb.Request{ ServiceName: &service, Method: &method, Request: data, RequestId: &ticket, } hreqBody, err := proto.Marshal(req) if err != nil { return err } hrespBody, err := c.post(hreqBody, timeout) if err != nil { return err } res := &remotepb.Response{} if err := proto.Unmarshal(hrespBody, res); err != nil { return err } if res.RpcError != nil { ce := &CallError{ Detail: res.RpcError.GetDetail(), Code: *res.RpcError.Code, } switch remotepb.RpcError_ErrorCode(ce.Code) { case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED: ce.Timeout = true } return ce } if res.ApplicationError != nil { return &APIError{ Service: *req.ServiceName, Detail: res.ApplicationError.GetDetail(), Code: *res.ApplicationError.Code, } } if res.Exception != nil || res.JavaException != nil { // This shouldn't happen, but let's be defensive. return &CallError{ Detail: "service bridge returned exception", Code: int32(remotepb.RpcError_UNKNOWN), } } return proto.Unmarshal(res.Response, out) } func (c *context) Request() *http.Request { return c.req } func (c *context) addLogLine(ll *logpb.UserAppLogLine) { // Truncate long log lines. // TODO(dsymonds): Check if this is still necessary. const lim = 8 << 10 if len(*ll.Message) > lim { suffix := fmt.Sprintf("...(length %d)", len(*ll.Message)) ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix) } c.pendingLogs.Lock() c.pendingLogs.lines = append(c.pendingLogs.lines, ll) c.pendingLogs.Unlock() } var logLevelName = map[int64]string{ 0: "DEBUG", 1: "INFO", 2: "WARNING", 3: "ERROR", 4: "CRITICAL", } func logf(c *context, level int64, format string, args ...interface{}) { if c == nil { panic("not an App Engine context") } s := fmt.Sprintf(format, args...) s = strings.TrimRight(s, "\n") // Remove any trailing newline characters. c.addLogLine(&logpb.UserAppLogLine{ TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3), Level: &level, Message: &s, }) // Only duplicate log to stderr if not running on App Engine second generation if !IsSecondGen() { log.Print(logLevelName[level] + ": " + s) } } // flushLog attempts to flush any pending logs to the appserver. // It should not be called concurrently. func (c *context) flushLog(force bool) (flushed bool) { c.pendingLogs.Lock() // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious. n, rem := 0, 30<<20 for ; n < len(c.pendingLogs.lines); n++ { ll := c.pendingLogs.lines[n] // Each log line will require about 3 bytes of overhead. nb := proto.Size(ll) + 3 if nb > rem { break } rem -= nb } lines := c.pendingLogs.lines[:n] c.pendingLogs.lines = c.pendingLogs.lines[n:] c.pendingLogs.Unlock() if len(lines) == 0 && !force { // Nothing to flush. return false } rescueLogs := false defer func() { if rescueLogs { c.pendingLogs.Lock() c.pendingLogs.lines = append(lines, c.pendingLogs.lines...) c.pendingLogs.Unlock() } }() buf, err := proto.Marshal(&logpb.UserAppLogGroup{ LogLine: lines, }) if err != nil { log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err) rescueLogs = true return false } req := &logpb.FlushRequest{ Logs: buf, } res := &basepb.VoidProto{} c.pendingLogs.Lock() c.pendingLogs.flushes++ c.pendingLogs.Unlock() if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil { log.Printf("internal.flushLog: Flush RPC: %v", err) rescueLogs = true return false } return true } const ( // Log flushing parameters. flushInterval = 1 * time.Second forceFlushInterval = 60 * time.Second ) func (c *context) logFlusher(stop <-chan int) { lastFlush := time.Now() tick := time.NewTicker(flushInterval) for { select { case <-stop: // Request finished. tick.Stop() return case <-tick.C: force := time.Now().Sub(lastFlush) > forceFlushInterval if c.flushLog(force) { lastFlush = time.Now() } } } } func ContextForTesting(req *http.Request) netcontext.Context { return toContext(&context{req: req}) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/identity_classic.go
// Copyright 2015 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // +build appengine package internal import ( "appengine" netcontext "golang.org/x/net/context" ) func init() { appengineStandard = true } func DefaultVersionHostname(ctx netcontext.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) } return appengine.DefaultVersionHostname(c) } func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() } func ServerSoftware() string { return appengine.ServerSoftware() } func InstanceID() string { return appengine.InstanceID() } func IsDevAppServer() bool { return appengine.IsDevAppServer() } func RequestID(ctx netcontext.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) } return appengine.RequestID(c) } func ModuleName(ctx netcontext.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) } return appengine.ModuleName(c) } func VersionID(ctx netcontext.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) } return appengine.VersionID(c) } func fullyQualifiedAppID(ctx netcontext.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) } return c.FullyQualifiedAppID() }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/identity_flex.go
// Copyright 2018 Google LLC. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // +build appenginevm package internal func init() { appengineFlex = true }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/api_classic.go
// Copyright 2015 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // +build appengine package internal import ( "errors" "fmt" "net/http" "time" "appengine" "appengine_internal" basepb "appengine_internal/base" "github.com/golang/protobuf/proto" netcontext "golang.org/x/net/context" ) var contextKey = "holds an appengine.Context" // fromContext returns the App Engine context or nil if ctx is not // derived from an App Engine context. func fromContext(ctx netcontext.Context) appengine.Context { c, _ := ctx.Value(&contextKey).(appengine.Context) return c } // This is only for classic App Engine adapters. func ClassicContextFromContext(ctx netcontext.Context) (appengine.Context, error) { c := fromContext(ctx) if c == nil { return nil, errNotAppEngineContext } return c, nil } func withContext(parent netcontext.Context, c appengine.Context) netcontext.Context { ctx := netcontext.WithValue(parent, &contextKey, c) s := &basepb.StringProto{} c.Call("__go__", "GetNamespace", &basepb.VoidProto{}, s, nil) if ns := s.GetValue(); ns != "" { ctx = NamespacedContext(ctx, ns) } return ctx } func IncomingHeaders(ctx netcontext.Context) http.Header { if c := fromContext(ctx); c != nil { if req, ok := c.Request().(*http.Request); ok { return req.Header } } return nil } func ReqContext(req *http.Request) netcontext.Context { return WithContext(netcontext.Background(), req) } func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context { c := appengine.NewContext(req) return withContext(parent, c) } type testingContext struct { appengine.Context req *http.Request } func (t *testingContext) FullyQualifiedAppID() string { return "dev~testcontext" } func (t *testingContext) Call(service, method string, _, _ appengine_internal.ProtoMessage, _ *appengine_internal.CallOptions) error { if service == "__go__" && method == "GetNamespace" { return nil } return fmt.Errorf("testingContext: unsupported Call") } func (t *testingContext) Request() interface{} { return t.req } func ContextForTesting(req *http.Request) netcontext.Context { return withContext(netcontext.Background(), &testingContext{req: req}) } func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error { if ns := NamespaceFromContext(ctx); ns != "" { if fn, ok := NamespaceMods[service]; ok { fn(in, ns) } } if f, ctx, ok := callOverrideFromContext(ctx); ok { return f(ctx, service, method, in, out) } // Handle already-done contexts quickly. select { case <-ctx.Done(): return ctx.Err() default: } c := fromContext(ctx) if c == nil { // Give a good error message rather than a panic lower down. return errNotAppEngineContext } // Apply transaction modifications if we're in a transaction. if t := transactionFromContext(ctx); t != nil { if t.finished { return errors.New("transaction context has expired") } applyTransaction(in, &t.transaction) } var opts *appengine_internal.CallOptions if d, ok := ctx.Deadline(); ok { opts = &appengine_internal.CallOptions{ Timeout: d.Sub(time.Now()), } } err := c.Call(service, method, in, out, opts) switch v := err.(type) { case *appengine_internal.APIError: return &APIError{ Service: v.Service, Detail: v.Detail, Code: v.Code, } case *appengine_internal.CallError: return &CallError{ Detail: v.Detail, Code: v.Code, Timeout: v.Timeout, } } return err } func handleHTTP(w http.ResponseWriter, r *http.Request) { panic("handleHTTP called; this should be impossible") } func logf(c appengine.Context, level int64, format string, args ...interface{}) { var fn func(format string, args ...interface{}) switch level { case 0: fn = c.Debugf case 1: fn = c.Infof case 2: fn = c.Warningf case 3: fn = c.Errorf case 4: fn = c.Criticalf default: // This shouldn't happen. fn = c.Criticalf } fn(format, args...) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/api_common.go
// Copyright 2015 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package internal import ( "errors" "os" "github.com/golang/protobuf/proto" netcontext "golang.org/x/net/context" ) var errNotAppEngineContext = errors.New("not an App Engine context") type CallOverrideFunc func(ctx netcontext.Context, service, method string, in, out proto.Message) error var callOverrideKey = "holds []CallOverrideFunc" func WithCallOverride(ctx netcontext.Context, f CallOverrideFunc) netcontext.Context { // We avoid appending to any existing call override // so we don't risk overwriting a popped stack below. var cofs []CallOverrideFunc if uf, ok := ctx.Value(&callOverrideKey).([]CallOverrideFunc); ok { cofs = append(cofs, uf...) } cofs = append(cofs, f) return netcontext.WithValue(ctx, &callOverrideKey, cofs) } func callOverrideFromContext(ctx netcontext.Context) (CallOverrideFunc, netcontext.Context, bool) { cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc) if len(cofs) == 0 { return nil, nil, false } // We found a list of overrides; grab the last, and reconstitute a // context that will hide it. f := cofs[len(cofs)-1] ctx = netcontext.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1]) return f, ctx, true } type logOverrideFunc func(level int64, format string, args ...interface{}) var logOverrideKey = "holds a logOverrideFunc" func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context { return netcontext.WithValue(ctx, &logOverrideKey, f) } var appIDOverrideKey = "holds a string, being the full app ID" func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context { return netcontext.WithValue(ctx, &appIDOverrideKey, appID) } var namespaceKey = "holds the namespace string" func withNamespace(ctx netcontext.Context, ns string) netcontext.Context { return netcontext.WithValue(ctx, &namespaceKey, ns) } func NamespaceFromContext(ctx netcontext.Context) string { // If there's no namespace, return the empty string. ns, _ := ctx.Value(&namespaceKey).(string) return ns } // FullyQualifiedAppID returns the fully-qualified application ID. // This may contain a partition prefix (e.g. "s~" for High Replication apps), // or a domain prefix (e.g. "example.com:"). func FullyQualifiedAppID(ctx netcontext.Context) string { if id, ok := ctx.Value(&appIDOverrideKey).(string); ok { return id } return fullyQualifiedAppID(ctx) } func Logf(ctx netcontext.Context, level int64, format string, args ...interface{}) { if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok { f(level, format, args...) return } c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) } logf(c, level, format, args...) } // NamespacedContext wraps a Context to support namespaces. func NamespacedContext(ctx netcontext.Context, namespace string) netcontext.Context { return withNamespace(ctx, namespace) } // SetTestEnv sets the env variables for testing background ticket in Flex. func SetTestEnv() func() { var environ = []struct { key, value string }{ {"GAE_LONG_APP_ID", "my-app-id"}, {"GAE_MINOR_VERSION", "067924799508853122"}, {"GAE_MODULE_INSTANCE", "0"}, {"GAE_MODULE_NAME", "default"}, {"GAE_MODULE_VERSION", "20150612t184001"}, } for _, v := range environ { old := os.Getenv(v.key) os.Setenv(v.key, v.value) v.value = old } return func() { // Restore old environment after the test completes. for _, v := range environ { if v.value == "" { os.Unsetenv(v.key) continue } os.Setenv(v.key, v.value) } } }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/main.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // +build appengine package internal import ( "appengine_internal" ) func Main() { MainPath = "" appengine_internal.Main() }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/app_id.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package internal import ( "strings" ) func parseFullAppID(appid string) (partition, domain, displayID string) { if i := strings.Index(appid, "~"); i != -1 { partition, appid = appid[:i], appid[i+1:] } if i := strings.Index(appid, ":"); i != -1 { domain, appid = appid[:i], appid[i+1:] } return partition, domain, appid } // appID returns "appid" or "domain.com:appid". func appID(fullAppID string) string { _, dom, dis := parseFullAppID(fullAppID) if dom != "" { return dom + ":" + dis } return dis }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/identity.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package internal import ( "os" netcontext "golang.org/x/net/context" ) var ( // This is set to true in identity_classic.go, which is behind the appengine build tag. // The appengine build tag is set for the first generation runtimes (<= Go 1.9) but not // the second generation runtimes (>= Go 1.11), so this indicates whether we're on a // first-gen runtime. See IsStandard below for the second-gen check. appengineStandard bool // This is set to true in identity_flex.go, which is behind the appenginevm build tag. appengineFlex bool ) // AppID is the implementation of the wrapper function of the same name in // ../identity.go. See that file for commentary. func AppID(c netcontext.Context) string { return appID(FullyQualifiedAppID(c)) } // IsStandard is the implementation of the wrapper function of the same name in // ../appengine.go. See that file for commentary. func IsStandard() bool { // appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not // second-gen (>= Go 1.11). return appengineStandard || IsSecondGen() } // IsStandard is the implementation of the wrapper function of the same name in // ../appengine.go. See that file for commentary. func IsSecondGen() bool { // Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime. return os.Getenv("GAE_ENV") == "standard" } // IsFlex is the implementation of the wrapper function of the same name in // ../appengine.go. See that file for commentary. func IsFlex() bool { return appengineFlex } // IsAppEngine is the implementation of the wrapper function of the same name in // ../appengine.go. See that file for commentary. func IsAppEngine() bool { return IsStandard() || IsFlex() }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/metadata.go
// Copyright 2014 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package internal // This file has code for accessing metadata. // // References: // https://cloud.google.com/compute/docs/metadata import ( "fmt" "io/ioutil" "net/http" "net/url" ) const ( metadataHost = "metadata" metadataPath = "/computeMetadata/v1/" ) var ( metadataRequestHeaders = http.Header{ "Metadata-Flavor": []string{"Google"}, } ) // TODO(dsymonds): Do we need to support default values, like Python? func mustGetMetadata(key string) []byte { b, err := getMetadata(key) if err != nil { panic(fmt.Sprintf("Metadata fetch failed for '%s': %v", key, err)) } return b } func getMetadata(key string) ([]byte, error) { // TODO(dsymonds): May need to use url.Parse to support keys with query args. req := &http.Request{ Method: "GET", URL: &url.URL{ Scheme: "http", Host: metadataHost, Path: metadataPath + key, }, Header: metadataRequestHeaders, Host: metadataHost, } resp, err := http.DefaultClient.Do(req) if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode != 200 { return nil, fmt.Errorf("metadata server returned HTTP %d", resp.StatusCode) } return ioutil.ReadAll(resp.Body) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/transaction.go
// Copyright 2014 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package internal // This file implements hooks for applying datastore transactions. import ( "errors" "reflect" "github.com/golang/protobuf/proto" netcontext "golang.org/x/net/context" basepb "google.golang.org/appengine/internal/base" pb "google.golang.org/appengine/internal/datastore" ) var transactionSetters = make(map[reflect.Type]reflect.Value) // RegisterTransactionSetter registers a function that sets transaction information // in a protocol buffer message. f should be a function with two arguments, // the first being a protocol buffer type, and the second being *datastore.Transaction. func RegisterTransactionSetter(f interface{}) { v := reflect.ValueOf(f) transactionSetters[v.Type().In(0)] = v } // applyTransaction applies the transaction t to message pb // by using the relevant setter passed to RegisterTransactionSetter. func applyTransaction(pb proto.Message, t *pb.Transaction) { v := reflect.ValueOf(pb) if f, ok := transactionSetters[v.Type()]; ok { f.Call([]reflect.Value{v, reflect.ValueOf(t)}) } } var transactionKey = "used for *Transaction" func transactionFromContext(ctx netcontext.Context) *transaction { t, _ := ctx.Value(&transactionKey).(*transaction) return t } func withTransaction(ctx netcontext.Context, t *transaction) netcontext.Context { return netcontext.WithValue(ctx, &transactionKey, t) } type transaction struct { transaction pb.Transaction finished bool } var ErrConcurrentTransaction = errors.New("internal: concurrent transaction") func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) { if transactionFromContext(c) != nil { return nil, errors.New("nested transactions are not supported") } // Begin the transaction. t := &transaction{} req := &pb.BeginTransactionRequest{ App: proto.String(FullyQualifiedAppID(c)), } if xg { req.AllowMultipleEg = proto.Bool(true) } if previousTransaction != nil { req.PreviousTransaction = previousTransaction } if readOnly { req.Mode = pb.BeginTransactionRequest_READ_ONLY.Enum() } else { req.Mode = pb.BeginTransactionRequest_READ_WRITE.Enum() } if err := Call(c, "datastore_v3", "BeginTransaction", req, &t.transaction); err != nil { return nil, err } // Call f, rolling back the transaction if f returns a non-nil error, or panics. // The panic is not recovered. defer func() { if t.finished { return } t.finished = true // Ignore the error return value, since we are already returning a non-nil // error (or we're panicking). Call(c, "datastore_v3", "Rollback", &t.transaction, &basepb.VoidProto{}) }() if err := f(withTransaction(c, t)); err != nil { return &t.transaction, err } t.finished = true // Commit the transaction. res := &pb.CommitResponse{} err := Call(c, "datastore_v3", "Commit", &t.transaction, res) if ae, ok := err.(*APIError); ok { /* TODO: restore this conditional if appengine.IsDevAppServer() { */ // The Python Dev AppServer raises an ApplicationError with error code 2 (which is // Error.CONCURRENT_TRANSACTION) and message "Concurrency exception.". if ae.Code == int32(pb.Error_BAD_REQUEST) && ae.Detail == "ApplicationError: 2 Concurrency exception." { return &t.transaction, ErrConcurrentTransaction } if ae.Code == int32(pb.Error_CONCURRENT_TRANSACTION) { return &t.transaction, ErrConcurrentTransaction } } return &t.transaction, err }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/regen.sh
#!/bin/bash -e # # This script rebuilds the generated code for the protocol buffers. # To run this you will need protoc and goprotobuf installed; # see https://github.com/golang/protobuf for instructions. PKG=google.golang.org/appengine function die() { echo 1>&2 $* exit 1 } # Sanity check that the right tools are accessible. for tool in go protoc protoc-gen-go; do q=$(which $tool) || die "didn't find $tool" echo 1>&2 "$tool: $q" done echo -n 1>&2 "finding package dir... " pkgdir=$(go list -f '{{.Dir}}' $PKG) echo 1>&2 $pkgdir base=$(echo $pkgdir | sed "s,/$PKG\$,,") echo 1>&2 "base: $base" cd $base # Run protoc once per package. for dir in $(find $PKG/internal -name '*.proto' | xargs dirname | sort | uniq); do echo 1>&2 "* $dir" protoc --go_out=. $dir/*.proto done for f in $(find $PKG/internal -name '*.pb.go'); do # Remove proto.RegisterEnum calls. # These cause duplicate registration panics when these packages # are used on classic App Engine. proto.RegisterEnum only affects # parsing the text format; we don't care about that. # https://code.google.com/p/googleappengine/issues/detail?id=11670#c17 sed -i '/proto.RegisterEnum/d' $f done
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/identity_vm.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // +build !appengine package internal import ( "log" "net/http" "os" "strings" netcontext "golang.org/x/net/context" ) // These functions are implementations of the wrapper functions // in ../appengine/identity.go. See that file for commentary. const ( hDefaultVersionHostname = "X-AppEngine-Default-Version-Hostname" hRequestLogId = "X-AppEngine-Request-Log-Id" hDatacenter = "X-AppEngine-Datacenter" ) func ctxHeaders(ctx netcontext.Context) http.Header { c := fromContext(ctx) if c == nil { return nil } return c.Request().Header } func DefaultVersionHostname(ctx netcontext.Context) string { return ctxHeaders(ctx).Get(hDefaultVersionHostname) } func RequestID(ctx netcontext.Context) string { return ctxHeaders(ctx).Get(hRequestLogId) } func Datacenter(ctx netcontext.Context) string { if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" { return dc } // If the header isn't set, read zone from the metadata service. // It has the format projects/[NUMERIC_PROJECT_ID]/zones/[ZONE] zone, err := getMetadata("instance/zone") if err != nil { log.Printf("Datacenter: %v", err) return "" } parts := strings.Split(string(zone), "/") if len(parts) == 0 { return "" } return parts[len(parts)-1] } func ServerSoftware() string { // TODO(dsymonds): Remove fallback when we've verified this. if s := os.Getenv("SERVER_SOFTWARE"); s != "" { return s } if s := os.Getenv("GAE_ENV"); s != "" { return s } return "Google App Engine/1.x.x" } // TODO(dsymonds): Remove the metadata fetches. func ModuleName(_ netcontext.Context) string { if s := os.Getenv("GAE_MODULE_NAME"); s != "" { return s } if s := os.Getenv("GAE_SERVICE"); s != "" { return s } return string(mustGetMetadata("instance/attributes/gae_backend_name")) } func VersionID(_ netcontext.Context) string { if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" { return s1 + "." + s2 } if s1, s2 := os.Getenv("GAE_VERSION"), os.Getenv("GAE_DEPLOYMENT_ID"); s1 != "" && s2 != "" { return s1 + "." + s2 } return string(mustGetMetadata("instance/attributes/gae_backend_version")) + "." + string(mustGetMetadata("instance/attributes/gae_backend_minor_version")) } func InstanceID() string { if s := os.Getenv("GAE_MODULE_INSTANCE"); s != "" { return s } if s := os.Getenv("GAE_INSTANCE"); s != "" { return s } return string(mustGetMetadata("instance/attributes/gae_backend_instance")) } func partitionlessAppID() string { // gae_project has everything except the partition prefix. if appID := os.Getenv("GAE_LONG_APP_ID"); appID != "" { return appID } if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" { return project } return string(mustGetMetadata("instance/attributes/gae_project")) } func fullyQualifiedAppID(_ netcontext.Context) string { if s := os.Getenv("GAE_APPLICATION"); s != "" { return s } appID := partitionlessAppID() part := os.Getenv("GAE_PARTITION") if part == "" { part = string(mustGetMetadata("instance/attributes/gae_partition")) } if part != "" { appID = part + "~" + appID } return appID } func IsDevAppServer() bool { return os.Getenv("RUN_WITH_DEVAPPSERVER") != "" }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/net.go
// Copyright 2014 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package internal // This file implements a network dialer that limits the number of concurrent connections. // It is only used for API calls. import ( "log" "net" "runtime" "sync" "time" ) var limitSem = make(chan int, 100) // TODO(dsymonds): Use environment variable. func limitRelease() { // non-blocking select { case <-limitSem: default: // This should not normally happen. log.Print("appengine: unbalanced limitSem release!") } } func limitDial(network, addr string) (net.Conn, error) { limitSem <- 1 // Dial with a timeout in case the API host is MIA. // The connection should normally be very fast. conn, err := net.DialTimeout(network, addr, 10*time.Second) if err != nil { limitRelease() return nil, err } lc := &limitConn{Conn: conn} runtime.SetFinalizer(lc, (*limitConn).Close) // shouldn't usually be required return lc, nil } type limitConn struct { close sync.Once net.Conn } func (lc *limitConn) Close() error { defer lc.close.Do(func() { limitRelease() runtime.SetFinalizer(lc, nil) }) return lc.Conn.Close() }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/main_common.go
package internal // MainPath stores the file path of the main package. On App Engine Standard // using Go version 1.9 and below, this will be unset. On App Engine Flex and // App Engine Standard second-gen (Go 1.11 and above), this will be the // filepath to package main. var MainPath string
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/internal.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // Package internal provides support for package appengine. // // Programs should not use this package directly. Its API is not stable. // Use packages appengine and appengine/* instead. package internal import ( "fmt" "github.com/golang/protobuf/proto" remotepb "google.golang.org/appengine/internal/remote_api" ) // errorCodeMaps is a map of service name to the error code map for the service. var errorCodeMaps = make(map[string]map[int32]string) // RegisterErrorCodeMap is called from API implementations to register their // error code map. This should only be called from init functions. func RegisterErrorCodeMap(service string, m map[int32]string) { errorCodeMaps[service] = m } type timeoutCodeKey struct { service string code int32 } // timeoutCodes is the set of service+code pairs that represent timeouts. var timeoutCodes = make(map[timeoutCodeKey]bool) func RegisterTimeoutErrorCode(service string, code int32) { timeoutCodes[timeoutCodeKey{service, code}] = true } // APIError is the type returned by appengine.Context's Call method // when an API call fails in an API-specific way. This may be, for instance, // a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE. type APIError struct { Service string Detail string Code int32 // API-specific error code } func (e *APIError) Error() string { if e.Code == 0 { if e.Detail == "" { return "APIError <empty>" } return e.Detail } s := fmt.Sprintf("API error %d", e.Code) if m, ok := errorCodeMaps[e.Service]; ok { s += " (" + e.Service + ": " + m[e.Code] + ")" } else { // Shouldn't happen, but provide a bit more detail if it does. s = e.Service + " " + s } if e.Detail != "" { s += ": " + e.Detail } return s } func (e *APIError) IsTimeout() bool { return timeoutCodes[timeoutCodeKey{e.Service, e.Code}] } // CallError is the type returned by appengine.Context's Call method when an // API call fails in a generic way, such as RpcError::CAPABILITY_DISABLED. type CallError struct { Detail string Code int32 // TODO: Remove this if we get a distinguishable error code. Timeout bool } func (e *CallError) Error() string { var msg string switch remotepb.RpcError_ErrorCode(e.Code) { case remotepb.RpcError_UNKNOWN: return e.Detail case remotepb.RpcError_OVER_QUOTA: msg = "Over quota" case remotepb.RpcError_CAPABILITY_DISABLED: msg = "Capability disabled" case remotepb.RpcError_CANCELLED: msg = "Canceled" default: msg = fmt.Sprintf("Call error %d", e.Code) } s := msg + ": " + e.Detail if e.Timeout { s += " (timeout)" } return s } func (e *CallError) IsTimeout() bool { return e.Timeout } // NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace. // The function should be prepared to be called on the same message more than once; it should only modify the // RPC request the first time. var NamespaceMods = make(map[string]func(m proto.Message, namespace string))
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/main_vm.go
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // +build !appengine package internal import ( "io" "log" "net/http" "net/url" "os" "path/filepath" "runtime" ) func Main() { MainPath = filepath.Dir(findMainPath()) installHealthChecker(http.DefaultServeMux) port := "8080" if s := os.Getenv("PORT"); s != "" { port = s } host := "" if IsDevAppServer() { host = "127.0.0.1" } if err := http.ListenAndServe(host+":"+port, http.HandlerFunc(handleHTTP)); err != nil { log.Fatalf("http.ListenAndServe: %v", err) } } // Find the path to package main by looking at the root Caller. func findMainPath() string { pc := make([]uintptr, 100) n := runtime.Callers(2, pc) frames := runtime.CallersFrames(pc[:n]) for { frame, more := frames.Next() // Tests won't have package main, instead they have testing.tRunner if frame.Function == "main.main" || frame.Function == "testing.tRunner" { return frame.File } if !more { break } } return "" } func installHealthChecker(mux *http.ServeMux) { // If no health check handler has been installed by this point, add a trivial one. const healthPath = "/_ah/health" hreq := &http.Request{ Method: "GET", URL: &url.URL{ Path: healthPath, }, } if _, pat := mux.Handler(hreq); pat != healthPath { mux.HandleFunc(healthPath, func(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "ok") }) } }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto
syntax = "proto2"; option go_package = "remote_api"; package remote_api; message Request { required string service_name = 2; required string method = 3; required bytes request = 4; optional string request_id = 5; } message ApplicationError { required int32 code = 1; required string detail = 2; } message RpcError { enum ErrorCode { UNKNOWN = 0; CALL_NOT_FOUND = 1; PARSE_ERROR = 2; SECURITY_VIOLATION = 3; OVER_QUOTA = 4; REQUEST_TOO_LARGE = 5; CAPABILITY_DISABLED = 6; FEATURE_DISABLED = 7; BAD_REQUEST = 8; RESPONSE_TOO_LARGE = 9; CANCELLED = 10; REPLAY_ERROR = 11; DEADLINE_EXCEEDED = 12; } required int32 code = 1; optional string detail = 2; } message Response { optional bytes response = 1; optional bytes exception = 2; optional ApplicationError application_error = 3; optional bytes java_exception = 4; optional RpcError rpc_error = 5; }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/remote_api/remote_api.proto package remote_api import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type RpcError_ErrorCode int32 const ( RpcError_UNKNOWN RpcError_ErrorCode = 0 RpcError_CALL_NOT_FOUND RpcError_ErrorCode = 1 RpcError_PARSE_ERROR RpcError_ErrorCode = 2 RpcError_SECURITY_VIOLATION RpcError_ErrorCode = 3 RpcError_OVER_QUOTA RpcError_ErrorCode = 4 RpcError_REQUEST_TOO_LARGE RpcError_ErrorCode = 5 RpcError_CAPABILITY_DISABLED RpcError_ErrorCode = 6 RpcError_FEATURE_DISABLED RpcError_ErrorCode = 7 RpcError_BAD_REQUEST RpcError_ErrorCode = 8 RpcError_RESPONSE_TOO_LARGE RpcError_ErrorCode = 9 RpcError_CANCELLED RpcError_ErrorCode = 10 RpcError_REPLAY_ERROR RpcError_ErrorCode = 11 RpcError_DEADLINE_EXCEEDED RpcError_ErrorCode = 12 ) var RpcError_ErrorCode_name = map[int32]string{ 0: "UNKNOWN", 1: "CALL_NOT_FOUND", 2: "PARSE_ERROR", 3: "SECURITY_VIOLATION", 4: "OVER_QUOTA", 5: "REQUEST_TOO_LARGE", 6: "CAPABILITY_DISABLED", 7: "FEATURE_DISABLED", 8: "BAD_REQUEST", 9: "RESPONSE_TOO_LARGE", 10: "CANCELLED", 11: "REPLAY_ERROR", 12: "DEADLINE_EXCEEDED", } var RpcError_ErrorCode_value = map[string]int32{ "UNKNOWN": 0, "CALL_NOT_FOUND": 1, "PARSE_ERROR": 2, "SECURITY_VIOLATION": 3, "OVER_QUOTA": 4, "REQUEST_TOO_LARGE": 5, "CAPABILITY_DISABLED": 6, "FEATURE_DISABLED": 7, "BAD_REQUEST": 8, "RESPONSE_TOO_LARGE": 9, "CANCELLED": 10, "REPLAY_ERROR": 11, "DEADLINE_EXCEEDED": 12, } func (x RpcError_ErrorCode) Enum() *RpcError_ErrorCode { p := new(RpcError_ErrorCode) *p = x return p } func (x RpcError_ErrorCode) String() string { return proto.EnumName(RpcError_ErrorCode_name, int32(x)) } func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(RpcError_ErrorCode_value, data, "RpcError_ErrorCode") if err != nil { return err } *x = RpcError_ErrorCode(value) return nil } func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_remote_api_1978114ec33a273d, []int{2, 0} } type Request struct { ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"` Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"` Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"` RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Request) Reset() { *m = Request{} } func (m *Request) String() string { return proto.CompactTextString(m) } func (*Request) ProtoMessage() {} func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor_remote_api_1978114ec33a273d, []int{0} } func (m *Request) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Request.Unmarshal(m, b) } func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Request.Marshal(b, m, deterministic) } func (dst *Request) XXX_Merge(src proto.Message) { xxx_messageInfo_Request.Merge(dst, src) } func (m *Request) XXX_Size() int { return xxx_messageInfo_Request.Size(m) } func (m *Request) XXX_DiscardUnknown() { xxx_messageInfo_Request.DiscardUnknown(m) } var xxx_messageInfo_Request proto.InternalMessageInfo func (m *Request) GetServiceName() string { if m != nil && m.ServiceName != nil { return *m.ServiceName } return "" } func (m *Request) GetMethod() string { if m != nil && m.Method != nil { return *m.Method } return "" } func (m *Request) GetRequest() []byte { if m != nil { return m.Request } return nil } func (m *Request) GetRequestId() string { if m != nil && m.RequestId != nil { return *m.RequestId } return "" } type ApplicationError struct { Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *ApplicationError) Reset() { *m = ApplicationError{} } func (m *ApplicationError) String() string { return proto.CompactTextString(m) } func (*ApplicationError) ProtoMessage() {} func (*ApplicationError) Descriptor() ([]byte, []int) { return fileDescriptor_remote_api_1978114ec33a273d, []int{1} } func (m *ApplicationError) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationError.Unmarshal(m, b) } func (m *ApplicationError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ApplicationError.Marshal(b, m, deterministic) } func (dst *ApplicationError) XXX_Merge(src proto.Message) { xxx_messageInfo_ApplicationError.Merge(dst, src) } func (m *ApplicationError) XXX_Size() int { return xxx_messageInfo_ApplicationError.Size(m) } func (m *ApplicationError) XXX_DiscardUnknown() { xxx_messageInfo_ApplicationError.DiscardUnknown(m) } var xxx_messageInfo_ApplicationError proto.InternalMessageInfo func (m *ApplicationError) GetCode() int32 { if m != nil && m.Code != nil { return *m.Code } return 0 } func (m *ApplicationError) GetDetail() string { if m != nil && m.Detail != nil { return *m.Detail } return "" } type RpcError struct { Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *RpcError) Reset() { *m = RpcError{} } func (m *RpcError) String() string { return proto.CompactTextString(m) } func (*RpcError) ProtoMessage() {} func (*RpcError) Descriptor() ([]byte, []int) { return fileDescriptor_remote_api_1978114ec33a273d, []int{2} } func (m *RpcError) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RpcError.Unmarshal(m, b) } func (m *RpcError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RpcError.Marshal(b, m, deterministic) } func (dst *RpcError) XXX_Merge(src proto.Message) { xxx_messageInfo_RpcError.Merge(dst, src) } func (m *RpcError) XXX_Size() int { return xxx_messageInfo_RpcError.Size(m) } func (m *RpcError) XXX_DiscardUnknown() { xxx_messageInfo_RpcError.DiscardUnknown(m) } var xxx_messageInfo_RpcError proto.InternalMessageInfo func (m *RpcError) GetCode() int32 { if m != nil && m.Code != nil { return *m.Code } return 0 } func (m *RpcError) GetDetail() string { if m != nil && m.Detail != nil { return *m.Detail } return "" } type Response struct { Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"` JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"` RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor_remote_api_1978114ec33a273d, []int{3} } func (m *Response) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Response.Unmarshal(m, b) } func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Response.Marshal(b, m, deterministic) } func (dst *Response) XXX_Merge(src proto.Message) { xxx_messageInfo_Response.Merge(dst, src) } func (m *Response) XXX_Size() int { return xxx_messageInfo_Response.Size(m) } func (m *Response) XXX_DiscardUnknown() { xxx_messageInfo_Response.DiscardUnknown(m) } var xxx_messageInfo_Response proto.InternalMessageInfo func (m *Response) GetResponse() []byte { if m != nil { return m.Response } return nil } func (m *Response) GetException() []byte { if m != nil { return m.Exception } return nil } func (m *Response) GetApplicationError() *ApplicationError { if m != nil { return m.ApplicationError } return nil } func (m *Response) GetJavaException() []byte { if m != nil { return m.JavaException } return nil } func (m *Response) GetRpcError() *RpcError { if m != nil { return m.RpcError } return nil } func init() { proto.RegisterType((*Request)(nil), "remote_api.Request") proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError") proto.RegisterType((*RpcError)(nil), "remote_api.RpcError") proto.RegisterType((*Response)(nil), "remote_api.Response") } func init() { proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor_remote_api_1978114ec33a273d) } var fileDescriptor_remote_api_1978114ec33a273d = []byte{ // 531 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40, 0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42, 0xca, 0x53, 0x2a, 0x38, 0x00, 0x62, 0x63, 0x6f, 0x91, 0x85, 0x65, 0xa7, 0x6b, 0xbb, 0x50, 0x5e, 0x56, 0x2b, 0x67, 0x65, 0x8c, 0x12, 0xaf, 0xd9, 0x98, 0x8a, 0x17, 0x6e, 0xc0, 0xb5, 0x38, 0x0c, 0xb7, 0x40, 0x36, 0x6e, 0x63, 0xf5, 0x89, 0xb7, 0x7f, 0x7e, 0x7b, 0xe6, 0x1b, 0xcd, 0xcc, 0xc2, 0xbb, 0x5c, 0xa9, 0x7c, 0x23, 0x17, 0xb9, 0xda, 0x88, 0x32, 0x5f, 0x28, 0x9d, 0x5f, 0x88, 0xaa, 0x92, 0x65, 0x5e, 0x94, 0xf2, 0xa2, 0x28, 0x6b, 0xa9, 0x4b, 0xb1, 0xb9, 0xd0, 0x72, 0xab, 0x6a, 0xc9, 0x45, 0x55, 0xf4, 0xe4, 0xa2, 0xd2, 0xaa, 0x56, 0x18, 0xf6, 0xce, 0xec, 0x27, 0x8c, 0x98, 0xfc, 0xf6, 0x5d, 0xee, 0x6a, 0xfc, 0x12, 0xec, 0x9d, 0xd4, 0xb7, 0x45, 0x26, 0x79, 0x29, 0xb6, 0xd2, 0x31, 0xa7, 0xe6, 0xdc, 0x62, 0x93, 0xce, 0x0b, 0xc5, 0x56, 0xe2, 0x33, 0x38, 0xdc, 0xca, 0xfa, 0x8b, 0x5a, 0x3b, 0x07, 0xed, 0xc7, 0x2e, 0xc2, 0x0e, 0x8c, 0xf4, 0xbf, 0x2a, 0xce, 0x60, 0x6a, 0xce, 0x6d, 0x76, 0x17, 0xe2, 0x17, 0x00, 0x9d, 0xe4, 0xc5, 0xda, 0x19, 0x4e, 0x8d, 0xb9, 0xc5, 0xac, 0xce, 0xf1, 0xd7, 0xb3, 0xb7, 0x80, 0x48, 0x55, 0x6d, 0x8a, 0x4c, 0xd4, 0x85, 0x2a, 0xa9, 0xd6, 0x4a, 0x63, 0x0c, 0x83, 0x4c, 0xad, 0xa5, 0x63, 0x4c, 0xcd, 0xf9, 0x90, 0xb5, 0xba, 0x01, 0xaf, 0x65, 0x2d, 0x8a, 0x4d, 0xd7, 0x55, 0x17, 0xcd, 0x7e, 0x9b, 0x30, 0x66, 0x55, 0xf6, 0x7f, 0x89, 0x46, 0x2f, 0xf1, 0x97, 0x09, 0x56, 0x9b, 0xe5, 0x36, 0x7f, 0x4d, 0x60, 0x94, 0x86, 0x1f, 0xc2, 0xe8, 0x63, 0x88, 0x1e, 0x61, 0x0c, 0xc7, 0x2e, 0x09, 0x02, 0x1e, 0x46, 0x09, 0xbf, 0x8c, 0xd2, 0xd0, 0x43, 0x06, 0x7e, 0x0c, 0x93, 0x15, 0x61, 0x31, 0xe5, 0x94, 0xb1, 0x88, 0x21, 0x13, 0x9f, 0x01, 0x8e, 0xa9, 0x9b, 0x32, 0x3f, 0xb9, 0xe1, 0xd7, 0x7e, 0x14, 0x90, 0xc4, 0x8f, 0x42, 0x74, 0x80, 0x8f, 0x01, 0xa2, 0x6b, 0xca, 0xf8, 0x55, 0x1a, 0x25, 0x04, 0x0d, 0xf0, 0x53, 0x38, 0x61, 0xf4, 0x2a, 0xa5, 0x71, 0xc2, 0x93, 0x28, 0xe2, 0x01, 0x61, 0xef, 0x29, 0x1a, 0xe2, 0x67, 0xf0, 0xc4, 0x25, 0x2b, 0xb2, 0xf4, 0x83, 0xa6, 0x80, 0xe7, 0xc7, 0x64, 0x19, 0x50, 0x0f, 0x1d, 0xe2, 0x53, 0x40, 0x97, 0x94, 0x24, 0x29, 0xa3, 0x7b, 0x77, 0xd4, 0xe0, 0x97, 0xc4, 0xe3, 0x5d, 0x25, 0x34, 0x6e, 0xf0, 0x8c, 0xc6, 0xab, 0x28, 0x8c, 0x69, 0xaf, 0xae, 0x85, 0x8f, 0xc0, 0x72, 0x49, 0xe8, 0xd2, 0xa0, 0xc9, 0x03, 0x8c, 0xc0, 0x66, 0x74, 0x15, 0x90, 0x9b, 0xae, 0xef, 0x49, 0xd3, 0x8f, 0x47, 0x89, 0x17, 0xf8, 0x21, 0xe5, 0xf4, 0x93, 0x4b, 0xa9, 0x47, 0x3d, 0x64, 0xcf, 0xfe, 0x18, 0x30, 0x66, 0x72, 0x57, 0xa9, 0x72, 0x27, 0xf1, 0x73, 0x18, 0xeb, 0x4e, 0x3b, 0xc6, 0xd4, 0x98, 0xdb, 0xec, 0x3e, 0xc6, 0xe7, 0x60, 0xc9, 0x1f, 0x99, 0xac, 0x9a, 0x75, 0xb5, 0x23, 0xb5, 0xd9, 0xde, 0xc0, 0x3e, 0x9c, 0x88, 0xfd, 0x3a, 0xb9, 0x6c, 0x06, 0xec, 0x1c, 0x4c, 0x8d, 0xf9, 0xe4, 0xcd, 0xf9, 0xa2, 0x77, 0x87, 0x0f, 0x77, 0xce, 0x90, 0x78, 0x78, 0x05, 0xaf, 0xe0, 0xf8, 0xab, 0xb8, 0x15, 0x7c, 0x4f, 0x1b, 0xb4, 0xb4, 0xa3, 0xc6, 0xa5, 0xf7, 0xc4, 0xd7, 0x60, 0xe9, 0x2a, 0xeb, 0x48, 0xc3, 0x96, 0x74, 0xda, 0x27, 0xdd, 0x1d, 0x07, 0x1b, 0xeb, 0x4e, 0x2d, 0xed, 0xcf, 0xbd, 0x07, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd1, 0x0f, 0x22, 0x4f, 0x03, 0x00, 0x00, }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto
syntax = "proto2"; option go_package = "datastore"; package appengine; message Action{} message PropertyValue { optional int64 int64Value = 1; optional bool booleanValue = 2; optional string stringValue = 3; optional double doubleValue = 4; optional group PointValue = 5 { required double x = 6; required double y = 7; } optional group UserValue = 8 { required string email = 9; required string auth_domain = 10; optional string nickname = 11; optional string federated_identity = 21; optional string federated_provider = 22; } optional group ReferenceValue = 12 { required string app = 13; optional string name_space = 20; repeated group PathElement = 14 { required string type = 15; optional int64 id = 16; optional string name = 17; } } } message Property { enum Meaning { NO_MEANING = 0; BLOB = 14; TEXT = 15; BYTESTRING = 16; ATOM_CATEGORY = 1; ATOM_LINK = 2; ATOM_TITLE = 3; ATOM_CONTENT = 4; ATOM_SUMMARY = 5; ATOM_AUTHOR = 6; GD_WHEN = 7; GD_EMAIL = 8; GEORSS_POINT = 9; GD_IM = 10; GD_PHONENUMBER = 11; GD_POSTALADDRESS = 12; GD_RATING = 13; BLOBKEY = 17; ENTITY_PROTO = 19; INDEX_VALUE = 18; }; optional Meaning meaning = 1 [default = NO_MEANING]; optional string meaning_uri = 2; required string name = 3; required PropertyValue value = 5; required bool multiple = 4; optional bool searchable = 6 [default=false]; enum FtsTokenizationOption { HTML = 1; ATOM = 2; } optional FtsTokenizationOption fts_tokenization_option = 8; optional string locale = 9 [default = "en"]; } message Path { repeated group Element = 1 { required string type = 2; optional int64 id = 3; optional string name = 4; } } message Reference { required string app = 13; optional string name_space = 20; required Path path = 14; } message User { required string email = 1; required string auth_domain = 2; optional string nickname = 3; optional string federated_identity = 6; optional string federated_provider = 7; } message EntityProto { required Reference key = 13; required Path entity_group = 16; optional User owner = 17; enum Kind { GD_CONTACT = 1; GD_EVENT = 2; GD_MESSAGE = 3; } optional Kind kind = 4; optional string kind_uri = 5; repeated Property property = 14; repeated Property raw_property = 15; optional int32 rank = 18; } message CompositeProperty { required int64 index_id = 1; repeated string value = 2; } message Index { required string entity_type = 1; required bool ancestor = 5; repeated group Property = 2 { required string name = 3; enum Direction { ASCENDING = 1; DESCENDING = 2; } optional Direction direction = 4 [default = ASCENDING]; } } message CompositeIndex { required string app_id = 1; required int64 id = 2; required Index definition = 3; enum State { WRITE_ONLY = 1; READ_WRITE = 2; DELETED = 3; ERROR = 4; } required State state = 4; optional bool only_use_if_required = 6 [default = false]; } message IndexPostfix { message IndexValue { required string property_name = 1; required PropertyValue value = 2; } repeated IndexValue index_value = 1; optional Reference key = 2; optional bool before = 3 [default=true]; } message IndexPosition { optional string key = 1; optional bool before = 2 [default=true]; } message Snapshot { enum Status { INACTIVE = 0; ACTIVE = 1; } required int64 ts = 1; } message InternalHeader { optional string qos = 1; } message Transaction { optional InternalHeader header = 4; required fixed64 handle = 1; required string app = 2; optional bool mark_changes = 3 [default = false]; } message Query { optional InternalHeader header = 39; required string app = 1; optional string name_space = 29; optional string kind = 3; optional Reference ancestor = 17; repeated group Filter = 4 { enum Operator { LESS_THAN = 1; LESS_THAN_OR_EQUAL = 2; GREATER_THAN = 3; GREATER_THAN_OR_EQUAL = 4; EQUAL = 5; IN = 6; EXISTS = 7; } required Operator op = 6; repeated Property property = 14; } optional string search_query = 8; repeated group Order = 9 { enum Direction { ASCENDING = 1; DESCENDING = 2; } required string property = 10; optional Direction direction = 11 [default = ASCENDING]; } enum Hint { ORDER_FIRST = 1; ANCESTOR_FIRST = 2; FILTER_FIRST = 3; } optional Hint hint = 18; optional int32 count = 23; optional int32 offset = 12 [default = 0]; optional int32 limit = 16; optional CompiledCursor compiled_cursor = 30; optional CompiledCursor end_compiled_cursor = 31; repeated CompositeIndex composite_index = 19; optional bool require_perfect_plan = 20 [default = false]; optional bool keys_only = 21 [default = false]; optional Transaction transaction = 22; optional bool compile = 25 [default = false]; optional int64 failover_ms = 26; optional bool strong = 32; repeated string property_name = 33; repeated string group_by_property_name = 34; optional bool distinct = 24; optional int64 min_safe_time_seconds = 35; repeated string safe_replica_name = 36; optional bool persist_offset = 37 [default=false]; } message CompiledQuery { required group PrimaryScan = 1 { optional string index_name = 2; optional string start_key = 3; optional bool start_inclusive = 4; optional string end_key = 5; optional bool end_inclusive = 6; repeated string start_postfix_value = 22; repeated string end_postfix_value = 23; optional int64 end_unapplied_log_timestamp_us = 19; } repeated group MergeJoinScan = 7 { required string index_name = 8; repeated string prefix_value = 9; optional bool value_prefix = 20 [default=false]; } optional Index index_def = 21; optional int32 offset = 10 [default = 0]; optional int32 limit = 11; required bool keys_only = 12; repeated string property_name = 24; optional int32 distinct_infix_size = 25; optional group EntityFilter = 13 { optional bool distinct = 14 [default=false]; optional string kind = 17; optional Reference ancestor = 18; } } message CompiledCursor { optional group Position = 2 { optional string start_key = 27; repeated group IndexValue = 29 { optional string property = 30; required PropertyValue value = 31; } optional Reference key = 32; optional bool start_inclusive = 28 [default=true]; } } message Cursor { required fixed64 cursor = 1; optional string app = 2; } message Error { enum ErrorCode { BAD_REQUEST = 1; CONCURRENT_TRANSACTION = 2; INTERNAL_ERROR = 3; NEED_INDEX = 4; TIMEOUT = 5; PERMISSION_DENIED = 6; BIGTABLE_ERROR = 7; COMMITTED_BUT_STILL_APPLYING = 8; CAPABILITY_DISABLED = 9; TRY_ALTERNATE_BACKEND = 10; SAFE_TIME_TOO_OLD = 11; } } message Cost { optional int32 index_writes = 1; optional int32 index_write_bytes = 2; optional int32 entity_writes = 3; optional int32 entity_write_bytes = 4; optional group CommitCost = 5 { optional int32 requested_entity_puts = 6; optional int32 requested_entity_deletes = 7; }; optional int32 approximate_storage_delta = 8; optional int32 id_sequence_updates = 9; } message GetRequest { optional InternalHeader header = 6; repeated Reference key = 1; optional Transaction transaction = 2; optional int64 failover_ms = 3; optional bool strong = 4; optional bool allow_deferred = 5 [default=false]; } message GetResponse { repeated group Entity = 1 { optional EntityProto entity = 2; optional Reference key = 4; optional int64 version = 3; } repeated Reference deferred = 5; optional bool in_order = 6 [default=true]; } message PutRequest { optional InternalHeader header = 11; repeated EntityProto entity = 1; optional Transaction transaction = 2; repeated CompositeIndex composite_index = 3; optional bool trusted = 4 [default = false]; optional bool force = 7 [default = false]; optional bool mark_changes = 8 [default = false]; repeated Snapshot snapshot = 9; enum AutoIdPolicy { CURRENT = 0; SEQUENTIAL = 1; } optional AutoIdPolicy auto_id_policy = 10 [default = CURRENT]; } message PutResponse { repeated Reference key = 1; optional Cost cost = 2; repeated int64 version = 3; } message TouchRequest { optional InternalHeader header = 10; repeated Reference key = 1; repeated CompositeIndex composite_index = 2; optional bool force = 3 [default = false]; repeated Snapshot snapshot = 9; } message TouchResponse { optional Cost cost = 1; } message DeleteRequest { optional InternalHeader header = 10; repeated Reference key = 6; optional Transaction transaction = 5; optional bool trusted = 4 [default = false]; optional bool force = 7 [default = false]; optional bool mark_changes = 8 [default = false]; repeated Snapshot snapshot = 9; } message DeleteResponse { optional Cost cost = 1; repeated int64 version = 3; } message NextRequest { optional InternalHeader header = 5; required Cursor cursor = 1; optional int32 count = 2; optional int32 offset = 4 [default = 0]; optional bool compile = 3 [default = false]; } message QueryResult { optional Cursor cursor = 1; repeated EntityProto result = 2; optional int32 skipped_results = 7; required bool more_results = 3; optional bool keys_only = 4; optional bool index_only = 9; optional bool small_ops = 10; optional CompiledQuery compiled_query = 5; optional CompiledCursor compiled_cursor = 6; repeated CompositeIndex index = 8; repeated int64 version = 11; } message AllocateIdsRequest { optional InternalHeader header = 4; optional Reference model_key = 1; optional int64 size = 2; optional int64 max = 3; repeated Reference reserve = 5; } message AllocateIdsResponse { required int64 start = 1; required int64 end = 2; optional Cost cost = 3; } message CompositeIndices { repeated CompositeIndex index = 1; } message AddActionsRequest { optional InternalHeader header = 3; required Transaction transaction = 1; repeated Action action = 2; } message AddActionsResponse { } message BeginTransactionRequest { optional InternalHeader header = 3; required string app = 1; optional bool allow_multiple_eg = 2 [default = false]; optional string database_id = 4; enum TransactionMode { UNKNOWN = 0; READ_ONLY = 1; READ_WRITE = 2; } optional TransactionMode mode = 5 [default = UNKNOWN]; optional Transaction previous_transaction = 7; } message CommitResponse { optional Cost cost = 1; repeated group Version = 3 { required Reference root_entity_key = 4; required int64 version = 5; } }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/datastore/datastore_v3.proto package datastore import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Property_Meaning int32 const ( Property_NO_MEANING Property_Meaning = 0 Property_BLOB Property_Meaning = 14 Property_TEXT Property_Meaning = 15 Property_BYTESTRING Property_Meaning = 16 Property_ATOM_CATEGORY Property_Meaning = 1 Property_ATOM_LINK Property_Meaning = 2 Property_ATOM_TITLE Property_Meaning = 3 Property_ATOM_CONTENT Property_Meaning = 4 Property_ATOM_SUMMARY Property_Meaning = 5 Property_ATOM_AUTHOR Property_Meaning = 6 Property_GD_WHEN Property_Meaning = 7 Property_GD_EMAIL Property_Meaning = 8 Property_GEORSS_POINT Property_Meaning = 9 Property_GD_IM Property_Meaning = 10 Property_GD_PHONENUMBER Property_Meaning = 11 Property_GD_POSTALADDRESS Property_Meaning = 12 Property_GD_RATING Property_Meaning = 13 Property_BLOBKEY Property_Meaning = 17 Property_ENTITY_PROTO Property_Meaning = 19 Property_INDEX_VALUE Property_Meaning = 18 ) var Property_Meaning_name = map[int32]string{ 0: "NO_MEANING", 14: "BLOB", 15: "TEXT", 16: "BYTESTRING", 1: "ATOM_CATEGORY", 2: "ATOM_LINK", 3: "ATOM_TITLE", 4: "ATOM_CONTENT", 5: "ATOM_SUMMARY", 6: "ATOM_AUTHOR", 7: "GD_WHEN", 8: "GD_EMAIL", 9: "GEORSS_POINT", 10: "GD_IM", 11: "GD_PHONENUMBER", 12: "GD_POSTALADDRESS", 13: "GD_RATING", 17: "BLOBKEY", 19: "ENTITY_PROTO", 18: "INDEX_VALUE", } var Property_Meaning_value = map[string]int32{ "NO_MEANING": 0, "BLOB": 14, "TEXT": 15, "BYTESTRING": 16, "ATOM_CATEGORY": 1, "ATOM_LINK": 2, "ATOM_TITLE": 3, "ATOM_CONTENT": 4, "ATOM_SUMMARY": 5, "ATOM_AUTHOR": 6, "GD_WHEN": 7, "GD_EMAIL": 8, "GEORSS_POINT": 9, "GD_IM": 10, "GD_PHONENUMBER": 11, "GD_POSTALADDRESS": 12, "GD_RATING": 13, "BLOBKEY": 17, "ENTITY_PROTO": 19, "INDEX_VALUE": 18, } func (x Property_Meaning) Enum() *Property_Meaning { p := new(Property_Meaning) *p = x return p } func (x Property_Meaning) String() string { return proto.EnumName(Property_Meaning_name, int32(x)) } func (x *Property_Meaning) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Property_Meaning_value, data, "Property_Meaning") if err != nil { return err } *x = Property_Meaning(value) return nil } func (Property_Meaning) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 0} } type Property_FtsTokenizationOption int32 const ( Property_HTML Property_FtsTokenizationOption = 1 Property_ATOM Property_FtsTokenizationOption = 2 ) var Property_FtsTokenizationOption_name = map[int32]string{ 1: "HTML", 2: "ATOM", } var Property_FtsTokenizationOption_value = map[string]int32{ "HTML": 1, "ATOM": 2, } func (x Property_FtsTokenizationOption) Enum() *Property_FtsTokenizationOption { p := new(Property_FtsTokenizationOption) *p = x return p } func (x Property_FtsTokenizationOption) String() string { return proto.EnumName(Property_FtsTokenizationOption_name, int32(x)) } func (x *Property_FtsTokenizationOption) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Property_FtsTokenizationOption_value, data, "Property_FtsTokenizationOption") if err != nil { return err } *x = Property_FtsTokenizationOption(value) return nil } func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 1} } type EntityProto_Kind int32 const ( EntityProto_GD_CONTACT EntityProto_Kind = 1 EntityProto_GD_EVENT EntityProto_Kind = 2 EntityProto_GD_MESSAGE EntityProto_Kind = 3 ) var EntityProto_Kind_name = map[int32]string{ 1: "GD_CONTACT", 2: "GD_EVENT", 3: "GD_MESSAGE", } var EntityProto_Kind_value = map[string]int32{ "GD_CONTACT": 1, "GD_EVENT": 2, "GD_MESSAGE": 3, } func (x EntityProto_Kind) Enum() *EntityProto_Kind { p := new(EntityProto_Kind) *p = x return p } func (x EntityProto_Kind) String() string { return proto.EnumName(EntityProto_Kind_name, int32(x)) } func (x *EntityProto_Kind) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(EntityProto_Kind_value, data, "EntityProto_Kind") if err != nil { return err } *x = EntityProto_Kind(value) return nil } func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6, 0} } type Index_Property_Direction int32 const ( Index_Property_ASCENDING Index_Property_Direction = 1 Index_Property_DESCENDING Index_Property_Direction = 2 ) var Index_Property_Direction_name = map[int32]string{ 1: "ASCENDING", 2: "DESCENDING", } var Index_Property_Direction_value = map[string]int32{ "ASCENDING": 1, "DESCENDING": 2, } func (x Index_Property_Direction) Enum() *Index_Property_Direction { p := new(Index_Property_Direction) *p = x return p } func (x Index_Property_Direction) String() string { return proto.EnumName(Index_Property_Direction_name, int32(x)) } func (x *Index_Property_Direction) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Index_Property_Direction_value, data, "Index_Property_Direction") if err != nil { return err } *x = Index_Property_Direction(value) return nil } func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0, 0} } type CompositeIndex_State int32 const ( CompositeIndex_WRITE_ONLY CompositeIndex_State = 1 CompositeIndex_READ_WRITE CompositeIndex_State = 2 CompositeIndex_DELETED CompositeIndex_State = 3 CompositeIndex_ERROR CompositeIndex_State = 4 ) var CompositeIndex_State_name = map[int32]string{ 1: "WRITE_ONLY", 2: "READ_WRITE", 3: "DELETED", 4: "ERROR", } var CompositeIndex_State_value = map[string]int32{ "WRITE_ONLY": 1, "READ_WRITE": 2, "DELETED": 3, "ERROR": 4, } func (x CompositeIndex_State) Enum() *CompositeIndex_State { p := new(CompositeIndex_State) *p = x return p } func (x CompositeIndex_State) String() string { return proto.EnumName(CompositeIndex_State_name, int32(x)) } func (x *CompositeIndex_State) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(CompositeIndex_State_value, data, "CompositeIndex_State") if err != nil { return err } *x = CompositeIndex_State(value) return nil } func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9, 0} } type Snapshot_Status int32 const ( Snapshot_INACTIVE Snapshot_Status = 0 Snapshot_ACTIVE Snapshot_Status = 1 ) var Snapshot_Status_name = map[int32]string{ 0: "INACTIVE", 1: "ACTIVE", } var Snapshot_Status_value = map[string]int32{ "INACTIVE": 0, "ACTIVE": 1, } func (x Snapshot_Status) Enum() *Snapshot_Status { p := new(Snapshot_Status) *p = x return p } func (x Snapshot_Status) String() string { return proto.EnumName(Snapshot_Status_name, int32(x)) } func (x *Snapshot_Status) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Snapshot_Status_value, data, "Snapshot_Status") if err != nil { return err } *x = Snapshot_Status(value) return nil } func (Snapshot_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12, 0} } type Query_Hint int32 const ( Query_ORDER_FIRST Query_Hint = 1 Query_ANCESTOR_FIRST Query_Hint = 2 Query_FILTER_FIRST Query_Hint = 3 ) var Query_Hint_name = map[int32]string{ 1: "ORDER_FIRST", 2: "ANCESTOR_FIRST", 3: "FILTER_FIRST", } var Query_Hint_value = map[string]int32{ "ORDER_FIRST": 1, "ANCESTOR_FIRST": 2, "FILTER_FIRST": 3, } func (x Query_Hint) Enum() *Query_Hint { p := new(Query_Hint) *p = x return p } func (x Query_Hint) String() string { return proto.EnumName(Query_Hint_name, int32(x)) } func (x *Query_Hint) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Query_Hint_value, data, "Query_Hint") if err != nil { return err } *x = Query_Hint(value) return nil } func (Query_Hint) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} } type Query_Filter_Operator int32 const ( Query_Filter_LESS_THAN Query_Filter_Operator = 1 Query_Filter_LESS_THAN_OR_EQUAL Query_Filter_Operator = 2 Query_Filter_GREATER_THAN Query_Filter_Operator = 3 Query_Filter_GREATER_THAN_OR_EQUAL Query_Filter_Operator = 4 Query_Filter_EQUAL Query_Filter_Operator = 5 Query_Filter_IN Query_Filter_Operator = 6 Query_Filter_EXISTS Query_Filter_Operator = 7 ) var Query_Filter_Operator_name = map[int32]string{ 1: "LESS_THAN", 2: "LESS_THAN_OR_EQUAL", 3: "GREATER_THAN", 4: "GREATER_THAN_OR_EQUAL", 5: "EQUAL", 6: "IN", 7: "EXISTS", } var Query_Filter_Operator_value = map[string]int32{ "LESS_THAN": 1, "LESS_THAN_OR_EQUAL": 2, "GREATER_THAN": 3, "GREATER_THAN_OR_EQUAL": 4, "EQUAL": 5, "IN": 6, "EXISTS": 7, } func (x Query_Filter_Operator) Enum() *Query_Filter_Operator { p := new(Query_Filter_Operator) *p = x return p } func (x Query_Filter_Operator) String() string { return proto.EnumName(Query_Filter_Operator_name, int32(x)) } func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Query_Filter_Operator_value, data, "Query_Filter_Operator") if err != nil { return err } *x = Query_Filter_Operator(value) return nil } func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0, 0} } type Query_Order_Direction int32 const ( Query_Order_ASCENDING Query_Order_Direction = 1 Query_Order_DESCENDING Query_Order_Direction = 2 ) var Query_Order_Direction_name = map[int32]string{ 1: "ASCENDING", 2: "DESCENDING", } var Query_Order_Direction_value = map[string]int32{ "ASCENDING": 1, "DESCENDING": 2, } func (x Query_Order_Direction) Enum() *Query_Order_Direction { p := new(Query_Order_Direction) *p = x return p } func (x Query_Order_Direction) String() string { return proto.EnumName(Query_Order_Direction_name, int32(x)) } func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Query_Order_Direction_value, data, "Query_Order_Direction") if err != nil { return err } *x = Query_Order_Direction(value) return nil } func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1, 0} } type Error_ErrorCode int32 const ( Error_BAD_REQUEST Error_ErrorCode = 1 Error_CONCURRENT_TRANSACTION Error_ErrorCode = 2 Error_INTERNAL_ERROR Error_ErrorCode = 3 Error_NEED_INDEX Error_ErrorCode = 4 Error_TIMEOUT Error_ErrorCode = 5 Error_PERMISSION_DENIED Error_ErrorCode = 6 Error_BIGTABLE_ERROR Error_ErrorCode = 7 Error_COMMITTED_BUT_STILL_APPLYING Error_ErrorCode = 8 Error_CAPABILITY_DISABLED Error_ErrorCode = 9 Error_TRY_ALTERNATE_BACKEND Error_ErrorCode = 10 Error_SAFE_TIME_TOO_OLD Error_ErrorCode = 11 ) var Error_ErrorCode_name = map[int32]string{ 1: "BAD_REQUEST", 2: "CONCURRENT_TRANSACTION", 3: "INTERNAL_ERROR", 4: "NEED_INDEX", 5: "TIMEOUT", 6: "PERMISSION_DENIED", 7: "BIGTABLE_ERROR", 8: "COMMITTED_BUT_STILL_APPLYING", 9: "CAPABILITY_DISABLED", 10: "TRY_ALTERNATE_BACKEND", 11: "SAFE_TIME_TOO_OLD", } var Error_ErrorCode_value = map[string]int32{ "BAD_REQUEST": 1, "CONCURRENT_TRANSACTION": 2, "INTERNAL_ERROR": 3, "NEED_INDEX": 4, "TIMEOUT": 5, "PERMISSION_DENIED": 6, "BIGTABLE_ERROR": 7, "COMMITTED_BUT_STILL_APPLYING": 8, "CAPABILITY_DISABLED": 9, "TRY_ALTERNATE_BACKEND": 10, "SAFE_TIME_TOO_OLD": 11, } func (x Error_ErrorCode) Enum() *Error_ErrorCode { p := new(Error_ErrorCode) *p = x return p } func (x Error_ErrorCode) String() string { return proto.EnumName(Error_ErrorCode_name, int32(x)) } func (x *Error_ErrorCode) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Error_ErrorCode_value, data, "Error_ErrorCode") if err != nil { return err } *x = Error_ErrorCode(value) return nil } func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19, 0} } type PutRequest_AutoIdPolicy int32 const ( PutRequest_CURRENT PutRequest_AutoIdPolicy = 0 PutRequest_SEQUENTIAL PutRequest_AutoIdPolicy = 1 ) var PutRequest_AutoIdPolicy_name = map[int32]string{ 0: "CURRENT", 1: "SEQUENTIAL", } var PutRequest_AutoIdPolicy_value = map[string]int32{ "CURRENT": 0, "SEQUENTIAL": 1, } func (x PutRequest_AutoIdPolicy) Enum() *PutRequest_AutoIdPolicy { p := new(PutRequest_AutoIdPolicy) *p = x return p } func (x PutRequest_AutoIdPolicy) String() string { return proto.EnumName(PutRequest_AutoIdPolicy_name, int32(x)) } func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(PutRequest_AutoIdPolicy_value, data, "PutRequest_AutoIdPolicy") if err != nil { return err } *x = PutRequest_AutoIdPolicy(value) return nil } func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23, 0} } type BeginTransactionRequest_TransactionMode int32 const ( BeginTransactionRequest_UNKNOWN BeginTransactionRequest_TransactionMode = 0 BeginTransactionRequest_READ_ONLY BeginTransactionRequest_TransactionMode = 1 BeginTransactionRequest_READ_WRITE BeginTransactionRequest_TransactionMode = 2 ) var BeginTransactionRequest_TransactionMode_name = map[int32]string{ 0: "UNKNOWN", 1: "READ_ONLY", 2: "READ_WRITE", } var BeginTransactionRequest_TransactionMode_value = map[string]int32{ "UNKNOWN": 0, "READ_ONLY": 1, "READ_WRITE": 2, } func (x BeginTransactionRequest_TransactionMode) Enum() *BeginTransactionRequest_TransactionMode { p := new(BeginTransactionRequest_TransactionMode) *p = x return p } func (x BeginTransactionRequest_TransactionMode) String() string { return proto.EnumName(BeginTransactionRequest_TransactionMode_name, int32(x)) } func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_TransactionMode_value, data, "BeginTransactionRequest_TransactionMode") if err != nil { return err } *x = BeginTransactionRequest_TransactionMode(value) return nil } func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36, 0} } type Action struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Action) Reset() { *m = Action{} } func (m *Action) String() string { return proto.CompactTextString(m) } func (*Action) ProtoMessage() {} func (*Action) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{0} } func (m *Action) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Action.Unmarshal(m, b) } func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Action.Marshal(b, m, deterministic) } func (dst *Action) XXX_Merge(src proto.Message) { xxx_messageInfo_Action.Merge(dst, src) } func (m *Action) XXX_Size() int { return xxx_messageInfo_Action.Size(m) } func (m *Action) XXX_DiscardUnknown() { xxx_messageInfo_Action.DiscardUnknown(m) } var xxx_messageInfo_Action proto.InternalMessageInfo type PropertyValue struct { Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"` BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"` StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"` DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"` Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"` Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"` Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PropertyValue) Reset() { *m = PropertyValue{} } func (m *PropertyValue) String() string { return proto.CompactTextString(m) } func (*PropertyValue) ProtoMessage() {} func (*PropertyValue) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1} } func (m *PropertyValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PropertyValue.Unmarshal(m, b) } func (m *PropertyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PropertyValue.Marshal(b, m, deterministic) } func (dst *PropertyValue) XXX_Merge(src proto.Message) { xxx_messageInfo_PropertyValue.Merge(dst, src) } func (m *PropertyValue) XXX_Size() int { return xxx_messageInfo_PropertyValue.Size(m) } func (m *PropertyValue) XXX_DiscardUnknown() { xxx_messageInfo_PropertyValue.DiscardUnknown(m) } var xxx_messageInfo_PropertyValue proto.InternalMessageInfo func (m *PropertyValue) GetInt64Value() int64 { if m != nil && m.Int64Value != nil { return *m.Int64Value } return 0 } func (m *PropertyValue) GetBooleanValue() bool { if m != nil && m.BooleanValue != nil { return *m.BooleanValue } return false } func (m *PropertyValue) GetStringValue() string { if m != nil && m.StringValue != nil { return *m.StringValue } return "" } func (m *PropertyValue) GetDoubleValue() float64 { if m != nil && m.DoubleValue != nil { return *m.DoubleValue } return 0 } func (m *PropertyValue) GetPointvalue() *PropertyValue_PointValue { if m != nil { return m.Pointvalue } return nil } func (m *PropertyValue) GetUservalue() *PropertyValue_UserValue { if m != nil { return m.Uservalue } return nil } func (m *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue { if m != nil { return m.Referencevalue } return nil } type PropertyValue_PointValue struct { X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"` Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} } func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) } func (*PropertyValue_PointValue) ProtoMessage() {} func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 0} } func (m *PropertyValue_PointValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PropertyValue_PointValue.Unmarshal(m, b) } func (m *PropertyValue_PointValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PropertyValue_PointValue.Marshal(b, m, deterministic) } func (dst *PropertyValue_PointValue) XXX_Merge(src proto.Message) { xxx_messageInfo_PropertyValue_PointValue.Merge(dst, src) } func (m *PropertyValue_PointValue) XXX_Size() int { return xxx_messageInfo_PropertyValue_PointValue.Size(m) } func (m *PropertyValue_PointValue) XXX_DiscardUnknown() { xxx_messageInfo_PropertyValue_PointValue.DiscardUnknown(m) } var xxx_messageInfo_PropertyValue_PointValue proto.InternalMessageInfo func (m *PropertyValue_PointValue) GetX() float64 { if m != nil && m.X != nil { return *m.X } return 0 } func (m *PropertyValue_PointValue) GetY() float64 { if m != nil && m.Y != nil { return *m.Y } return 0 } type PropertyValue_UserValue struct { Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"` AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"` FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} } func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) } func (*PropertyValue_UserValue) ProtoMessage() {} func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 1} } func (m *PropertyValue_UserValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PropertyValue_UserValue.Unmarshal(m, b) } func (m *PropertyValue_UserValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PropertyValue_UserValue.Marshal(b, m, deterministic) } func (dst *PropertyValue_UserValue) XXX_Merge(src proto.Message) { xxx_messageInfo_PropertyValue_UserValue.Merge(dst, src) } func (m *PropertyValue_UserValue) XXX_Size() int { return xxx_messageInfo_PropertyValue_UserValue.Size(m) } func (m *PropertyValue_UserValue) XXX_DiscardUnknown() { xxx_messageInfo_PropertyValue_UserValue.DiscardUnknown(m) } var xxx_messageInfo_PropertyValue_UserValue proto.InternalMessageInfo func (m *PropertyValue_UserValue) GetEmail() string { if m != nil && m.Email != nil { return *m.Email } return "" } func (m *PropertyValue_UserValue) GetAuthDomain() string { if m != nil && m.AuthDomain != nil { return *m.AuthDomain } return "" } func (m *PropertyValue_UserValue) GetNickname() string { if m != nil && m.Nickname != nil { return *m.Nickname } return "" } func (m *PropertyValue_UserValue) GetFederatedIdentity() string { if m != nil && m.FederatedIdentity != nil { return *m.FederatedIdentity } return "" } func (m *PropertyValue_UserValue) GetFederatedProvider() string { if m != nil && m.FederatedProvider != nil { return *m.FederatedProvider } return "" } type PropertyValue_ReferenceValue struct { App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } func (*PropertyValue_ReferenceValue) ProtoMessage() {} func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2} } func (m *PropertyValue_ReferenceValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PropertyValue_ReferenceValue.Unmarshal(m, b) } func (m *PropertyValue_ReferenceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PropertyValue_ReferenceValue.Marshal(b, m, deterministic) } func (dst *PropertyValue_ReferenceValue) XXX_Merge(src proto.Message) { xxx_messageInfo_PropertyValue_ReferenceValue.Merge(dst, src) } func (m *PropertyValue_ReferenceValue) XXX_Size() int { return xxx_messageInfo_PropertyValue_ReferenceValue.Size(m) } func (m *PropertyValue_ReferenceValue) XXX_DiscardUnknown() { xxx_messageInfo_PropertyValue_ReferenceValue.DiscardUnknown(m) } var xxx_messageInfo_PropertyValue_ReferenceValue proto.InternalMessageInfo func (m *PropertyValue_ReferenceValue) GetApp() string { if m != nil && m.App != nil { return *m.App } return "" } func (m *PropertyValue_ReferenceValue) GetNameSpace() string { if m != nil && m.NameSpace != nil { return *m.NameSpace } return "" } func (m *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_ReferenceValue_PathElement { if m != nil { return m.Pathelement } return nil } type PropertyValue_ReferenceValue_PathElement struct { Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"` Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"` Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PropertyValue_ReferenceValue_PathElement) Reset() { *m = PropertyValue_ReferenceValue_PathElement{} } func (m *PropertyValue_ReferenceValue_PathElement) String() string { return proto.CompactTextString(m) } func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {} func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2, 0} } func (m *PropertyValue_ReferenceValue_PathElement) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Unmarshal(m, b) } func (m *PropertyValue_ReferenceValue_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Marshal(b, m, deterministic) } func (dst *PropertyValue_ReferenceValue_PathElement) XXX_Merge(src proto.Message) { xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Merge(dst, src) } func (m *PropertyValue_ReferenceValue_PathElement) XXX_Size() int { return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Size(m) } func (m *PropertyValue_ReferenceValue_PathElement) XXX_DiscardUnknown() { xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.DiscardUnknown(m) } var xxx_messageInfo_PropertyValue_ReferenceValue_PathElement proto.InternalMessageInfo func (m *PropertyValue_ReferenceValue_PathElement) GetType() string { if m != nil && m.Type != nil { return *m.Type } return "" } func (m *PropertyValue_ReferenceValue_PathElement) GetId() int64 { if m != nil && m.Id != nil { return *m.Id } return 0 } func (m *PropertyValue_ReferenceValue_PathElement) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } type Property struct { Meaning *Property_Meaning `protobuf:"varint,1,opt,name=meaning,enum=appengine.Property_Meaning,def=0" json:"meaning,omitempty"` MeaningUri *string `protobuf:"bytes,2,opt,name=meaning_uri,json=meaningUri" json:"meaning_uri,omitempty"` Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` Value *PropertyValue `protobuf:"bytes,5,req,name=value" json:"value,omitempty"` Multiple *bool `protobuf:"varint,4,req,name=multiple" json:"multiple,omitempty"` Searchable *bool `protobuf:"varint,6,opt,name=searchable,def=0" json:"searchable,omitempty"` FtsTokenizationOption *Property_FtsTokenizationOption `protobuf:"varint,8,opt,name=fts_tokenization_option,json=ftsTokenizationOption,enum=appengine.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"` Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Property) Reset() { *m = Property{} } func (m *Property) String() string { return proto.CompactTextString(m) } func (*Property) ProtoMessage() {} func (*Property) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2} } func (m *Property) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Property.Unmarshal(m, b) } func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Property.Marshal(b, m, deterministic) } func (dst *Property) XXX_Merge(src proto.Message) { xxx_messageInfo_Property.Merge(dst, src) } func (m *Property) XXX_Size() int { return xxx_messageInfo_Property.Size(m) } func (m *Property) XXX_DiscardUnknown() { xxx_messageInfo_Property.DiscardUnknown(m) } var xxx_messageInfo_Property proto.InternalMessageInfo const Default_Property_Meaning Property_Meaning = Property_NO_MEANING const Default_Property_Searchable bool = false const Default_Property_Locale string = "en" func (m *Property) GetMeaning() Property_Meaning { if m != nil && m.Meaning != nil { return *m.Meaning } return Default_Property_Meaning } func (m *Property) GetMeaningUri() string { if m != nil && m.MeaningUri != nil { return *m.MeaningUri } return "" } func (m *Property) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } func (m *Property) GetValue() *PropertyValue { if m != nil { return m.Value } return nil } func (m *Property) GetMultiple() bool { if m != nil && m.Multiple != nil { return *m.Multiple } return false } func (m *Property) GetSearchable() bool { if m != nil && m.Searchable != nil { return *m.Searchable } return Default_Property_Searchable } func (m *Property) GetFtsTokenizationOption() Property_FtsTokenizationOption { if m != nil && m.FtsTokenizationOption != nil { return *m.FtsTokenizationOption } return Property_HTML } func (m *Property) GetLocale() string { if m != nil && m.Locale != nil { return *m.Locale } return Default_Property_Locale } type Path struct { Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Path) Reset() { *m = Path{} } func (m *Path) String() string { return proto.CompactTextString(m) } func (*Path) ProtoMessage() {} func (*Path) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3} } func (m *Path) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Path.Unmarshal(m, b) } func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Path.Marshal(b, m, deterministic) } func (dst *Path) XXX_Merge(src proto.Message) { xxx_messageInfo_Path.Merge(dst, src) } func (m *Path) XXX_Size() int { return xxx_messageInfo_Path.Size(m) } func (m *Path) XXX_DiscardUnknown() { xxx_messageInfo_Path.DiscardUnknown(m) } var xxx_messageInfo_Path proto.InternalMessageInfo func (m *Path) GetElement() []*Path_Element { if m != nil { return m.Element } return nil } type Path_Element struct { Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"` Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"` Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Path_Element) Reset() { *m = Path_Element{} } func (m *Path_Element) String() string { return proto.CompactTextString(m) } func (*Path_Element) ProtoMessage() {} func (*Path_Element) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0} } func (m *Path_Element) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Path_Element.Unmarshal(m, b) } func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic) } func (dst *Path_Element) XXX_Merge(src proto.Message) { xxx_messageInfo_Path_Element.Merge(dst, src) } func (m *Path_Element) XXX_Size() int { return xxx_messageInfo_Path_Element.Size(m) } func (m *Path_Element) XXX_DiscardUnknown() { xxx_messageInfo_Path_Element.DiscardUnknown(m) } var xxx_messageInfo_Path_Element proto.InternalMessageInfo func (m *Path_Element) GetType() string { if m != nil && m.Type != nil { return *m.Type } return "" } func (m *Path_Element) GetId() int64 { if m != nil && m.Id != nil { return *m.Id } return 0 } func (m *Path_Element) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } type Reference struct { App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Reference) Reset() { *m = Reference{} } func (m *Reference) String() string { return proto.CompactTextString(m) } func (*Reference) ProtoMessage() {} func (*Reference) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4} } func (m *Reference) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Reference.Unmarshal(m, b) } func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Reference.Marshal(b, m, deterministic) } func (dst *Reference) XXX_Merge(src proto.Message) { xxx_messageInfo_Reference.Merge(dst, src) } func (m *Reference) XXX_Size() int { return xxx_messageInfo_Reference.Size(m) } func (m *Reference) XXX_DiscardUnknown() { xxx_messageInfo_Reference.DiscardUnknown(m) } var xxx_messageInfo_Reference proto.InternalMessageInfo func (m *Reference) GetApp() string { if m != nil && m.App != nil { return *m.App } return "" } func (m *Reference) GetNameSpace() string { if m != nil && m.NameSpace != nil { return *m.NameSpace } return "" } func (m *Reference) GetPath() *Path { if m != nil { return m.Path } return nil } type User struct { Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"` AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *User) Reset() { *m = User{} } func (m *User) String() string { return proto.CompactTextString(m) } func (*User) ProtoMessage() {} func (*User) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{5} } func (m *User) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_User.Unmarshal(m, b) } func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_User.Marshal(b, m, deterministic) } func (dst *User) XXX_Merge(src proto.Message) { xxx_messageInfo_User.Merge(dst, src) } func (m *User) XXX_Size() int { return xxx_messageInfo_User.Size(m) } func (m *User) XXX_DiscardUnknown() { xxx_messageInfo_User.DiscardUnknown(m) } var xxx_messageInfo_User proto.InternalMessageInfo func (m *User) GetEmail() string { if m != nil && m.Email != nil { return *m.Email } return "" } func (m *User) GetAuthDomain() string { if m != nil && m.AuthDomain != nil { return *m.AuthDomain } return "" } func (m *User) GetNickname() string { if m != nil && m.Nickname != nil { return *m.Nickname } return "" } func (m *User) GetFederatedIdentity() string { if m != nil && m.FederatedIdentity != nil { return *m.FederatedIdentity } return "" } func (m *User) GetFederatedProvider() string { if m != nil && m.FederatedProvider != nil { return *m.FederatedProvider } return "" } type EntityProto struct { Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"` EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"` Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"` Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"` KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"` Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"` Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *EntityProto) Reset() { *m = EntityProto{} } func (m *EntityProto) String() string { return proto.CompactTextString(m) } func (*EntityProto) ProtoMessage() {} func (*EntityProto) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6} } func (m *EntityProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EntityProto.Unmarshal(m, b) } func (m *EntityProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_EntityProto.Marshal(b, m, deterministic) } func (dst *EntityProto) XXX_Merge(src proto.Message) { xxx_messageInfo_EntityProto.Merge(dst, src) } func (m *EntityProto) XXX_Size() int { return xxx_messageInfo_EntityProto.Size(m) } func (m *EntityProto) XXX_DiscardUnknown() { xxx_messageInfo_EntityProto.DiscardUnknown(m) } var xxx_messageInfo_EntityProto proto.InternalMessageInfo func (m *EntityProto) GetKey() *Reference { if m != nil { return m.Key } return nil } func (m *EntityProto) GetEntityGroup() *Path { if m != nil { return m.EntityGroup } return nil } func (m *EntityProto) GetOwner() *User { if m != nil { return m.Owner } return nil } func (m *EntityProto) GetKind() EntityProto_Kind { if m != nil && m.Kind != nil { return *m.Kind } return EntityProto_GD_CONTACT } func (m *EntityProto) GetKindUri() string { if m != nil && m.KindUri != nil { return *m.KindUri } return "" } func (m *EntityProto) GetProperty() []*Property { if m != nil { return m.Property } return nil } func (m *EntityProto) GetRawProperty() []*Property { if m != nil { return m.RawProperty } return nil } func (m *EntityProto) GetRank() int32 { if m != nil && m.Rank != nil { return *m.Rank } return 0 } type CompositeProperty struct { IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"` Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompositeProperty) Reset() { *m = CompositeProperty{} } func (m *CompositeProperty) String() string { return proto.CompactTextString(m) } func (*CompositeProperty) ProtoMessage() {} func (*CompositeProperty) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{7} } func (m *CompositeProperty) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompositeProperty.Unmarshal(m, b) } func (m *CompositeProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompositeProperty.Marshal(b, m, deterministic) } func (dst *CompositeProperty) XXX_Merge(src proto.Message) { xxx_messageInfo_CompositeProperty.Merge(dst, src) } func (m *CompositeProperty) XXX_Size() int { return xxx_messageInfo_CompositeProperty.Size(m) } func (m *CompositeProperty) XXX_DiscardUnknown() { xxx_messageInfo_CompositeProperty.DiscardUnknown(m) } var xxx_messageInfo_CompositeProperty proto.InternalMessageInfo func (m *CompositeProperty) GetIndexId() int64 { if m != nil && m.IndexId != nil { return *m.IndexId } return 0 } func (m *CompositeProperty) GetValue() []string { if m != nil { return m.Value } return nil } type Index struct { EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"` Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"` Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Index) Reset() { *m = Index{} } func (m *Index) String() string { return proto.CompactTextString(m) } func (*Index) ProtoMessage() {} func (*Index) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8} } func (m *Index) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Index.Unmarshal(m, b) } func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Index.Marshal(b, m, deterministic) } func (dst *Index) XXX_Merge(src proto.Message) { xxx_messageInfo_Index.Merge(dst, src) } func (m *Index) XXX_Size() int { return xxx_messageInfo_Index.Size(m) } func (m *Index) XXX_DiscardUnknown() { xxx_messageInfo_Index.DiscardUnknown(m) } var xxx_messageInfo_Index proto.InternalMessageInfo func (m *Index) GetEntityType() string { if m != nil && m.EntityType != nil { return *m.EntityType } return "" } func (m *Index) GetAncestor() bool { if m != nil && m.Ancestor != nil { return *m.Ancestor } return false } func (m *Index) GetProperty() []*Index_Property { if m != nil { return m.Property } return nil } type Index_Property struct { Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Index_Property) Reset() { *m = Index_Property{} } func (m *Index_Property) String() string { return proto.CompactTextString(m) } func (*Index_Property) ProtoMessage() {} func (*Index_Property) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0} } func (m *Index_Property) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Index_Property.Unmarshal(m, b) } func (m *Index_Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Index_Property.Marshal(b, m, deterministic) } func (dst *Index_Property) XXX_Merge(src proto.Message) { xxx_messageInfo_Index_Property.Merge(dst, src) } func (m *Index_Property) XXX_Size() int { return xxx_messageInfo_Index_Property.Size(m) } func (m *Index_Property) XXX_DiscardUnknown() { xxx_messageInfo_Index_Property.DiscardUnknown(m) } var xxx_messageInfo_Index_Property proto.InternalMessageInfo const Default_Index_Property_Direction Index_Property_Direction = Index_Property_ASCENDING func (m *Index_Property) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } func (m *Index_Property) GetDirection() Index_Property_Direction { if m != nil && m.Direction != nil { return *m.Direction } return Default_Index_Property_Direction } type CompositeIndex struct { AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"` Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"` State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"` OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompositeIndex) Reset() { *m = CompositeIndex{} } func (m *CompositeIndex) String() string { return proto.CompactTextString(m) } func (*CompositeIndex) ProtoMessage() {} func (*CompositeIndex) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9} } func (m *CompositeIndex) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompositeIndex.Unmarshal(m, b) } func (m *CompositeIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompositeIndex.Marshal(b, m, deterministic) } func (dst *CompositeIndex) XXX_Merge(src proto.Message) { xxx_messageInfo_CompositeIndex.Merge(dst, src) } func (m *CompositeIndex) XXX_Size() int { return xxx_messageInfo_CompositeIndex.Size(m) } func (m *CompositeIndex) XXX_DiscardUnknown() { xxx_messageInfo_CompositeIndex.DiscardUnknown(m) } var xxx_messageInfo_CompositeIndex proto.InternalMessageInfo const Default_CompositeIndex_OnlyUseIfRequired bool = false func (m *CompositeIndex) GetAppId() string { if m != nil && m.AppId != nil { return *m.AppId } return "" } func (m *CompositeIndex) GetId() int64 { if m != nil && m.Id != nil { return *m.Id } return 0 } func (m *CompositeIndex) GetDefinition() *Index { if m != nil { return m.Definition } return nil } func (m *CompositeIndex) GetState() CompositeIndex_State { if m != nil && m.State != nil { return *m.State } return CompositeIndex_WRITE_ONLY } func (m *CompositeIndex) GetOnlyUseIfRequired() bool { if m != nil && m.OnlyUseIfRequired != nil { return *m.OnlyUseIfRequired } return Default_CompositeIndex_OnlyUseIfRequired } type IndexPostfix struct { IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"` Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *IndexPostfix) Reset() { *m = IndexPostfix{} } func (m *IndexPostfix) String() string { return proto.CompactTextString(m) } func (*IndexPostfix) ProtoMessage() {} func (*IndexPostfix) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10} } func (m *IndexPostfix) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IndexPostfix.Unmarshal(m, b) } func (m *IndexPostfix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_IndexPostfix.Marshal(b, m, deterministic) } func (dst *IndexPostfix) XXX_Merge(src proto.Message) { xxx_messageInfo_IndexPostfix.Merge(dst, src) } func (m *IndexPostfix) XXX_Size() int { return xxx_messageInfo_IndexPostfix.Size(m) } func (m *IndexPostfix) XXX_DiscardUnknown() { xxx_messageInfo_IndexPostfix.DiscardUnknown(m) } var xxx_messageInfo_IndexPostfix proto.InternalMessageInfo const Default_IndexPostfix_Before bool = true func (m *IndexPostfix) GetIndexValue() []*IndexPostfix_IndexValue { if m != nil { return m.IndexValue } return nil } func (m *IndexPostfix) GetKey() *Reference { if m != nil { return m.Key } return nil } func (m *IndexPostfix) GetBefore() bool { if m != nil && m.Before != nil { return *m.Before } return Default_IndexPostfix_Before } type IndexPostfix_IndexValue struct { PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"` Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} } func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) } func (*IndexPostfix_IndexValue) ProtoMessage() {} func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10, 0} } func (m *IndexPostfix_IndexValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IndexPostfix_IndexValue.Unmarshal(m, b) } func (m *IndexPostfix_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_IndexPostfix_IndexValue.Marshal(b, m, deterministic) } func (dst *IndexPostfix_IndexValue) XXX_Merge(src proto.Message) { xxx_messageInfo_IndexPostfix_IndexValue.Merge(dst, src) } func (m *IndexPostfix_IndexValue) XXX_Size() int { return xxx_messageInfo_IndexPostfix_IndexValue.Size(m) } func (m *IndexPostfix_IndexValue) XXX_DiscardUnknown() { xxx_messageInfo_IndexPostfix_IndexValue.DiscardUnknown(m) } var xxx_messageInfo_IndexPostfix_IndexValue proto.InternalMessageInfo func (m *IndexPostfix_IndexValue) GetPropertyName() string { if m != nil && m.PropertyName != nil { return *m.PropertyName } return "" } func (m *IndexPostfix_IndexValue) GetValue() *PropertyValue { if m != nil { return m.Value } return nil } type IndexPosition struct { Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *IndexPosition) Reset() { *m = IndexPosition{} } func (m *IndexPosition) String() string { return proto.CompactTextString(m) } func (*IndexPosition) ProtoMessage() {} func (*IndexPosition) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{11} } func (m *IndexPosition) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IndexPosition.Unmarshal(m, b) } func (m *IndexPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_IndexPosition.Marshal(b, m, deterministic) } func (dst *IndexPosition) XXX_Merge(src proto.Message) { xxx_messageInfo_IndexPosition.Merge(dst, src) } func (m *IndexPosition) XXX_Size() int { return xxx_messageInfo_IndexPosition.Size(m) } func (m *IndexPosition) XXX_DiscardUnknown() { xxx_messageInfo_IndexPosition.DiscardUnknown(m) } var xxx_messageInfo_IndexPosition proto.InternalMessageInfo const Default_IndexPosition_Before bool = true func (m *IndexPosition) GetKey() string { if m != nil && m.Key != nil { return *m.Key } return "" } func (m *IndexPosition) GetBefore() bool { if m != nil && m.Before != nil { return *m.Before } return Default_IndexPosition_Before } type Snapshot struct { Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Snapshot.Unmarshal(m, b) } func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) } func (dst *Snapshot) XXX_Merge(src proto.Message) { xxx_messageInfo_Snapshot.Merge(dst, src) } func (m *Snapshot) XXX_Size() int { return xxx_messageInfo_Snapshot.Size(m) } func (m *Snapshot) XXX_DiscardUnknown() { xxx_messageInfo_Snapshot.DiscardUnknown(m) } var xxx_messageInfo_Snapshot proto.InternalMessageInfo func (m *Snapshot) GetTs() int64 { if m != nil && m.Ts != nil { return *m.Ts } return 0 } type InternalHeader struct { Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *InternalHeader) Reset() { *m = InternalHeader{} } func (m *InternalHeader) String() string { return proto.CompactTextString(m) } func (*InternalHeader) ProtoMessage() {} func (*InternalHeader) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{13} } func (m *InternalHeader) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InternalHeader.Unmarshal(m, b) } func (m *InternalHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_InternalHeader.Marshal(b, m, deterministic) } func (dst *InternalHeader) XXX_Merge(src proto.Message) { xxx_messageInfo_InternalHeader.Merge(dst, src) } func (m *InternalHeader) XXX_Size() int { return xxx_messageInfo_InternalHeader.Size(m) } func (m *InternalHeader) XXX_DiscardUnknown() { xxx_messageInfo_InternalHeader.DiscardUnknown(m) } var xxx_messageInfo_InternalHeader proto.InternalMessageInfo func (m *InternalHeader) GetQos() string { if m != nil && m.Qos != nil { return *m.Qos } return "" } type Transaction struct { Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"` App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"` MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Transaction) Reset() { *m = Transaction{} } func (m *Transaction) String() string { return proto.CompactTextString(m) } func (*Transaction) ProtoMessage() {} func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{14} } func (m *Transaction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Transaction.Unmarshal(m, b) } func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) } func (dst *Transaction) XXX_Merge(src proto.Message) { xxx_messageInfo_Transaction.Merge(dst, src) } func (m *Transaction) XXX_Size() int { return xxx_messageInfo_Transaction.Size(m) } func (m *Transaction) XXX_DiscardUnknown() { xxx_messageInfo_Transaction.DiscardUnknown(m) } var xxx_messageInfo_Transaction proto.InternalMessageInfo const Default_Transaction_MarkChanges bool = false func (m *Transaction) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *Transaction) GetHandle() uint64 { if m != nil && m.Handle != nil { return *m.Handle } return 0 } func (m *Transaction) GetApp() string { if m != nil && m.App != nil { return *m.App } return "" } func (m *Transaction) GetMarkChanges() bool { if m != nil && m.MarkChanges != nil { return *m.MarkChanges } return Default_Transaction_MarkChanges } type Query struct { Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"` App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"` Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"` SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"` Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"` Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"` Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"` Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"` Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"` CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"` CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"` KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"` Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"` Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"` FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"` PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"` Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"` MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"` SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"` PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Query) Reset() { *m = Query{} } func (m *Query) String() string { return proto.CompactTextString(m) } func (*Query) ProtoMessage() {} func (*Query) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15} } func (m *Query) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Query.Unmarshal(m, b) } func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Query.Marshal(b, m, deterministic) } func (dst *Query) XXX_Merge(src proto.Message) { xxx_messageInfo_Query.Merge(dst, src) } func (m *Query) XXX_Size() int { return xxx_messageInfo_Query.Size(m) } func (m *Query) XXX_DiscardUnknown() { xxx_messageInfo_Query.DiscardUnknown(m) } var xxx_messageInfo_Query proto.InternalMessageInfo const Default_Query_Offset int32 = 0 const Default_Query_RequirePerfectPlan bool = false const Default_Query_KeysOnly bool = false const Default_Query_Compile bool = false const Default_Query_PersistOffset bool = false func (m *Query) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *Query) GetApp() string { if m != nil && m.App != nil { return *m.App } return "" } func (m *Query) GetNameSpace() string { if m != nil && m.NameSpace != nil { return *m.NameSpace } return "" } func (m *Query) GetKind() string { if m != nil && m.Kind != nil { return *m.Kind } return "" } func (m *Query) GetAncestor() *Reference { if m != nil { return m.Ancestor } return nil } func (m *Query) GetFilter() []*Query_Filter { if m != nil { return m.Filter } return nil } func (m *Query) GetSearchQuery() string { if m != nil && m.SearchQuery != nil { return *m.SearchQuery } return "" } func (m *Query) GetOrder() []*Query_Order { if m != nil { return m.Order } return nil } func (m *Query) GetHint() Query_Hint { if m != nil && m.Hint != nil { return *m.Hint } return Query_ORDER_FIRST } func (m *Query) GetCount() int32 { if m != nil && m.Count != nil { return *m.Count } return 0 } func (m *Query) GetOffset() int32 { if m != nil && m.Offset != nil { return *m.Offset } return Default_Query_Offset } func (m *Query) GetLimit() int32 { if m != nil && m.Limit != nil { return *m.Limit } return 0 } func (m *Query) GetCompiledCursor() *CompiledCursor { if m != nil { return m.CompiledCursor } return nil } func (m *Query) GetEndCompiledCursor() *CompiledCursor { if m != nil { return m.EndCompiledCursor } return nil } func (m *Query) GetCompositeIndex() []*CompositeIndex { if m != nil { return m.CompositeIndex } return nil } func (m *Query) GetRequirePerfectPlan() bool { if m != nil && m.RequirePerfectPlan != nil { return *m.RequirePerfectPlan } return Default_Query_RequirePerfectPlan } func (m *Query) GetKeysOnly() bool { if m != nil && m.KeysOnly != nil { return *m.KeysOnly } return Default_Query_KeysOnly } func (m *Query) GetTransaction() *Transaction { if m != nil { return m.Transaction } return nil } func (m *Query) GetCompile() bool { if m != nil && m.Compile != nil { return *m.Compile } return Default_Query_Compile } func (m *Query) GetFailoverMs() int64 { if m != nil && m.FailoverMs != nil { return *m.FailoverMs } return 0 } func (m *Query) GetStrong() bool { if m != nil && m.Strong != nil { return *m.Strong } return false } func (m *Query) GetPropertyName() []string { if m != nil { return m.PropertyName } return nil } func (m *Query) GetGroupByPropertyName() []string { if m != nil { return m.GroupByPropertyName } return nil } func (m *Query) GetDistinct() bool { if m != nil && m.Distinct != nil { return *m.Distinct } return false } func (m *Query) GetMinSafeTimeSeconds() int64 { if m != nil && m.MinSafeTimeSeconds != nil { return *m.MinSafeTimeSeconds } return 0 } func (m *Query) GetSafeReplicaName() []string { if m != nil { return m.SafeReplicaName } return nil } func (m *Query) GetPersistOffset() bool { if m != nil && m.PersistOffset != nil { return *m.PersistOffset } return Default_Query_PersistOffset } type Query_Filter struct { Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"` Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Query_Filter) Reset() { *m = Query_Filter{} } func (m *Query_Filter) String() string { return proto.CompactTextString(m) } func (*Query_Filter) ProtoMessage() {} func (*Query_Filter) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} } func (m *Query_Filter) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Query_Filter.Unmarshal(m, b) } func (m *Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Query_Filter.Marshal(b, m, deterministic) } func (dst *Query_Filter) XXX_Merge(src proto.Message) { xxx_messageInfo_Query_Filter.Merge(dst, src) } func (m *Query_Filter) XXX_Size() int { return xxx_messageInfo_Query_Filter.Size(m) } func (m *Query_Filter) XXX_DiscardUnknown() { xxx_messageInfo_Query_Filter.DiscardUnknown(m) } var xxx_messageInfo_Query_Filter proto.InternalMessageInfo func (m *Query_Filter) GetOp() Query_Filter_Operator { if m != nil && m.Op != nil { return *m.Op } return Query_Filter_LESS_THAN } func (m *Query_Filter) GetProperty() []*Property { if m != nil { return m.Property } return nil } type Query_Order struct { Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"` Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Query_Order) Reset() { *m = Query_Order{} } func (m *Query_Order) String() string { return proto.CompactTextString(m) } func (*Query_Order) ProtoMessage() {} func (*Query_Order) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1} } func (m *Query_Order) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Query_Order.Unmarshal(m, b) } func (m *Query_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Query_Order.Marshal(b, m, deterministic) } func (dst *Query_Order) XXX_Merge(src proto.Message) { xxx_messageInfo_Query_Order.Merge(dst, src) } func (m *Query_Order) XXX_Size() int { return xxx_messageInfo_Query_Order.Size(m) } func (m *Query_Order) XXX_DiscardUnknown() { xxx_messageInfo_Query_Order.DiscardUnknown(m) } var xxx_messageInfo_Query_Order proto.InternalMessageInfo const Default_Query_Order_Direction Query_Order_Direction = Query_Order_ASCENDING func (m *Query_Order) GetProperty() string { if m != nil && m.Property != nil { return *m.Property } return "" } func (m *Query_Order) GetDirection() Query_Order_Direction { if m != nil && m.Direction != nil { return *m.Direction } return Default_Query_Order_Direction } type CompiledQuery struct { Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"` Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"` IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"` Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"` Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"` KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"` Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompiledQuery) Reset() { *m = CompiledQuery{} } func (m *CompiledQuery) String() string { return proto.CompactTextString(m) } func (*CompiledQuery) ProtoMessage() {} func (*CompiledQuery) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16} } func (m *CompiledQuery) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompiledQuery.Unmarshal(m, b) } func (m *CompiledQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompiledQuery.Marshal(b, m, deterministic) } func (dst *CompiledQuery) XXX_Merge(src proto.Message) { xxx_messageInfo_CompiledQuery.Merge(dst, src) } func (m *CompiledQuery) XXX_Size() int { return xxx_messageInfo_CompiledQuery.Size(m) } func (m *CompiledQuery) XXX_DiscardUnknown() { xxx_messageInfo_CompiledQuery.DiscardUnknown(m) } var xxx_messageInfo_CompiledQuery proto.InternalMessageInfo const Default_CompiledQuery_Offset int32 = 0 func (m *CompiledQuery) GetPrimaryscan() *CompiledQuery_PrimaryScan { if m != nil { return m.Primaryscan } return nil } func (m *CompiledQuery) GetMergejoinscan() []*CompiledQuery_MergeJoinScan { if m != nil { return m.Mergejoinscan } return nil } func (m *CompiledQuery) GetIndexDef() *Index { if m != nil { return m.IndexDef } return nil } func (m *CompiledQuery) GetOffset() int32 { if m != nil && m.Offset != nil { return *m.Offset } return Default_CompiledQuery_Offset } func (m *CompiledQuery) GetLimit() int32 { if m != nil && m.Limit != nil { return *m.Limit } return 0 } func (m *CompiledQuery) GetKeysOnly() bool { if m != nil && m.KeysOnly != nil { return *m.KeysOnly } return false } func (m *CompiledQuery) GetPropertyName() []string { if m != nil { return m.PropertyName } return nil } func (m *CompiledQuery) GetDistinctInfixSize() int32 { if m != nil && m.DistinctInfixSize != nil { return *m.DistinctInfixSize } return 0 } func (m *CompiledQuery) GetEntityfilter() *CompiledQuery_EntityFilter { if m != nil { return m.Entityfilter } return nil } type CompiledQuery_PrimaryScan struct { IndexName *string `protobuf:"bytes,2,opt,name=index_name,json=indexName" json:"index_name,omitempty"` StartKey *string `protobuf:"bytes,3,opt,name=start_key,json=startKey" json:"start_key,omitempty"` StartInclusive *bool `protobuf:"varint,4,opt,name=start_inclusive,json=startInclusive" json:"start_inclusive,omitempty"` EndKey *string `protobuf:"bytes,5,opt,name=end_key,json=endKey" json:"end_key,omitempty"` EndInclusive *bool `protobuf:"varint,6,opt,name=end_inclusive,json=endInclusive" json:"end_inclusive,omitempty"` StartPostfixValue []string `protobuf:"bytes,22,rep,name=start_postfix_value,json=startPostfixValue" json:"start_postfix_value,omitempty"` EndPostfixValue []string `protobuf:"bytes,23,rep,name=end_postfix_value,json=endPostfixValue" json:"end_postfix_value,omitempty"` EndUnappliedLogTimestampUs *int64 `protobuf:"varint,19,opt,name=end_unapplied_log_timestamp_us,json=endUnappliedLogTimestampUs" json:"end_unapplied_log_timestamp_us,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} } func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) } func (*CompiledQuery_PrimaryScan) ProtoMessage() {} func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 0} } func (m *CompiledQuery_PrimaryScan) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompiledQuery_PrimaryScan.Unmarshal(m, b) } func (m *CompiledQuery_PrimaryScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompiledQuery_PrimaryScan.Marshal(b, m, deterministic) } func (dst *CompiledQuery_PrimaryScan) XXX_Merge(src proto.Message) { xxx_messageInfo_CompiledQuery_PrimaryScan.Merge(dst, src) } func (m *CompiledQuery_PrimaryScan) XXX_Size() int { return xxx_messageInfo_CompiledQuery_PrimaryScan.Size(m) } func (m *CompiledQuery_PrimaryScan) XXX_DiscardUnknown() { xxx_messageInfo_CompiledQuery_PrimaryScan.DiscardUnknown(m) } var xxx_messageInfo_CompiledQuery_PrimaryScan proto.InternalMessageInfo func (m *CompiledQuery_PrimaryScan) GetIndexName() string { if m != nil && m.IndexName != nil { return *m.IndexName } return "" } func (m *CompiledQuery_PrimaryScan) GetStartKey() string { if m != nil && m.StartKey != nil { return *m.StartKey } return "" } func (m *CompiledQuery_PrimaryScan) GetStartInclusive() bool { if m != nil && m.StartInclusive != nil { return *m.StartInclusive } return false } func (m *CompiledQuery_PrimaryScan) GetEndKey() string { if m != nil && m.EndKey != nil { return *m.EndKey } return "" } func (m *CompiledQuery_PrimaryScan) GetEndInclusive() bool { if m != nil && m.EndInclusive != nil { return *m.EndInclusive } return false } func (m *CompiledQuery_PrimaryScan) GetStartPostfixValue() []string { if m != nil { return m.StartPostfixValue } return nil } func (m *CompiledQuery_PrimaryScan) GetEndPostfixValue() []string { if m != nil { return m.EndPostfixValue } return nil } func (m *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 { if m != nil && m.EndUnappliedLogTimestampUs != nil { return *m.EndUnappliedLogTimestampUs } return 0 } type CompiledQuery_MergeJoinScan struct { IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"` PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"` ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 1} } func (m *CompiledQuery_MergeJoinScan) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompiledQuery_MergeJoinScan.Unmarshal(m, b) } func (m *CompiledQuery_MergeJoinScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompiledQuery_MergeJoinScan.Marshal(b, m, deterministic) } func (dst *CompiledQuery_MergeJoinScan) XXX_Merge(src proto.Message) { xxx_messageInfo_CompiledQuery_MergeJoinScan.Merge(dst, src) } func (m *CompiledQuery_MergeJoinScan) XXX_Size() int { return xxx_messageInfo_CompiledQuery_MergeJoinScan.Size(m) } func (m *CompiledQuery_MergeJoinScan) XXX_DiscardUnknown() { xxx_messageInfo_CompiledQuery_MergeJoinScan.DiscardUnknown(m) } var xxx_messageInfo_CompiledQuery_MergeJoinScan proto.InternalMessageInfo const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false func (m *CompiledQuery_MergeJoinScan) GetIndexName() string { if m != nil && m.IndexName != nil { return *m.IndexName } return "" } func (m *CompiledQuery_MergeJoinScan) GetPrefixValue() []string { if m != nil { return m.PrefixValue } return nil } func (m *CompiledQuery_MergeJoinScan) GetValuePrefix() bool { if m != nil && m.ValuePrefix != nil { return *m.ValuePrefix } return Default_CompiledQuery_MergeJoinScan_ValuePrefix } type CompiledQuery_EntityFilter struct { Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"` Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"` Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} } func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) } func (*CompiledQuery_EntityFilter) ProtoMessage() {} func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 2} } func (m *CompiledQuery_EntityFilter) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompiledQuery_EntityFilter.Unmarshal(m, b) } func (m *CompiledQuery_EntityFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompiledQuery_EntityFilter.Marshal(b, m, deterministic) } func (dst *CompiledQuery_EntityFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_CompiledQuery_EntityFilter.Merge(dst, src) } func (m *CompiledQuery_EntityFilter) XXX_Size() int { return xxx_messageInfo_CompiledQuery_EntityFilter.Size(m) } func (m *CompiledQuery_EntityFilter) XXX_DiscardUnknown() { xxx_messageInfo_CompiledQuery_EntityFilter.DiscardUnknown(m) } var xxx_messageInfo_CompiledQuery_EntityFilter proto.InternalMessageInfo const Default_CompiledQuery_EntityFilter_Distinct bool = false func (m *CompiledQuery_EntityFilter) GetDistinct() bool { if m != nil && m.Distinct != nil { return *m.Distinct } return Default_CompiledQuery_EntityFilter_Distinct } func (m *CompiledQuery_EntityFilter) GetKind() string { if m != nil && m.Kind != nil { return *m.Kind } return "" } func (m *CompiledQuery_EntityFilter) GetAncestor() *Reference { if m != nil { return m.Ancestor } return nil } type CompiledCursor struct { Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompiledCursor) Reset() { *m = CompiledCursor{} } func (m *CompiledCursor) String() string { return proto.CompactTextString(m) } func (*CompiledCursor) ProtoMessage() {} func (*CompiledCursor) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17} } func (m *CompiledCursor) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompiledCursor.Unmarshal(m, b) } func (m *CompiledCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompiledCursor.Marshal(b, m, deterministic) } func (dst *CompiledCursor) XXX_Merge(src proto.Message) { xxx_messageInfo_CompiledCursor.Merge(dst, src) } func (m *CompiledCursor) XXX_Size() int { return xxx_messageInfo_CompiledCursor.Size(m) } func (m *CompiledCursor) XXX_DiscardUnknown() { xxx_messageInfo_CompiledCursor.DiscardUnknown(m) } var xxx_messageInfo_CompiledCursor proto.InternalMessageInfo func (m *CompiledCursor) GetPosition() *CompiledCursor_Position { if m != nil { return m.Position } return nil } type CompiledCursor_Position struct { StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"` Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"` Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"` StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} } func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) } func (*CompiledCursor_Position) ProtoMessage() {} func (*CompiledCursor_Position) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0} } func (m *CompiledCursor_Position) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompiledCursor_Position.Unmarshal(m, b) } func (m *CompiledCursor_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompiledCursor_Position.Marshal(b, m, deterministic) } func (dst *CompiledCursor_Position) XXX_Merge(src proto.Message) { xxx_messageInfo_CompiledCursor_Position.Merge(dst, src) } func (m *CompiledCursor_Position) XXX_Size() int { return xxx_messageInfo_CompiledCursor_Position.Size(m) } func (m *CompiledCursor_Position) XXX_DiscardUnknown() { xxx_messageInfo_CompiledCursor_Position.DiscardUnknown(m) } var xxx_messageInfo_CompiledCursor_Position proto.InternalMessageInfo const Default_CompiledCursor_Position_StartInclusive bool = true func (m *CompiledCursor_Position) GetStartKey() string { if m != nil && m.StartKey != nil { return *m.StartKey } return "" } func (m *CompiledCursor_Position) GetIndexvalue() []*CompiledCursor_Position_IndexValue { if m != nil { return m.Indexvalue } return nil } func (m *CompiledCursor_Position) GetKey() *Reference { if m != nil { return m.Key } return nil } func (m *CompiledCursor_Position) GetStartInclusive() bool { if m != nil && m.StartInclusive != nil { return *m.StartInclusive } return Default_CompiledCursor_Position_StartInclusive } type CompiledCursor_Position_IndexValue struct { Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"` Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompiledCursor_Position_IndexValue) Reset() { *m = CompiledCursor_Position_IndexValue{} } func (m *CompiledCursor_Position_IndexValue) String() string { return proto.CompactTextString(m) } func (*CompiledCursor_Position_IndexValue) ProtoMessage() {} func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0, 0} } func (m *CompiledCursor_Position_IndexValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompiledCursor_Position_IndexValue.Unmarshal(m, b) } func (m *CompiledCursor_Position_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompiledCursor_Position_IndexValue.Marshal(b, m, deterministic) } func (dst *CompiledCursor_Position_IndexValue) XXX_Merge(src proto.Message) { xxx_messageInfo_CompiledCursor_Position_IndexValue.Merge(dst, src) } func (m *CompiledCursor_Position_IndexValue) XXX_Size() int { return xxx_messageInfo_CompiledCursor_Position_IndexValue.Size(m) } func (m *CompiledCursor_Position_IndexValue) XXX_DiscardUnknown() { xxx_messageInfo_CompiledCursor_Position_IndexValue.DiscardUnknown(m) } var xxx_messageInfo_CompiledCursor_Position_IndexValue proto.InternalMessageInfo func (m *CompiledCursor_Position_IndexValue) GetProperty() string { if m != nil && m.Property != nil { return *m.Property } return "" } func (m *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue { if m != nil { return m.Value } return nil } type Cursor struct { Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"` App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Cursor) Reset() { *m = Cursor{} } func (m *Cursor) String() string { return proto.CompactTextString(m) } func (*Cursor) ProtoMessage() {} func (*Cursor) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{18} } func (m *Cursor) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Cursor.Unmarshal(m, b) } func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Cursor.Marshal(b, m, deterministic) } func (dst *Cursor) XXX_Merge(src proto.Message) { xxx_messageInfo_Cursor.Merge(dst, src) } func (m *Cursor) XXX_Size() int { return xxx_messageInfo_Cursor.Size(m) } func (m *Cursor) XXX_DiscardUnknown() { xxx_messageInfo_Cursor.DiscardUnknown(m) } var xxx_messageInfo_Cursor proto.InternalMessageInfo func (m *Cursor) GetCursor() uint64 { if m != nil && m.Cursor != nil { return *m.Cursor } return 0 } func (m *Cursor) GetApp() string { if m != nil && m.App != nil { return *m.App } return "" } type Error struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Error) Reset() { *m = Error{} } func (m *Error) String() string { return proto.CompactTextString(m) } func (*Error) ProtoMessage() {} func (*Error) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19} } func (m *Error) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Error.Unmarshal(m, b) } func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Error.Marshal(b, m, deterministic) } func (dst *Error) XXX_Merge(src proto.Message) { xxx_messageInfo_Error.Merge(dst, src) } func (m *Error) XXX_Size() int { return xxx_messageInfo_Error.Size(m) } func (m *Error) XXX_DiscardUnknown() { xxx_messageInfo_Error.DiscardUnknown(m) } var xxx_messageInfo_Error proto.InternalMessageInfo type Cost struct { IndexWrites *int32 `protobuf:"varint,1,opt,name=index_writes,json=indexWrites" json:"index_writes,omitempty"` IndexWriteBytes *int32 `protobuf:"varint,2,opt,name=index_write_bytes,json=indexWriteBytes" json:"index_write_bytes,omitempty"` EntityWrites *int32 `protobuf:"varint,3,opt,name=entity_writes,json=entityWrites" json:"entity_writes,omitempty"` EntityWriteBytes *int32 `protobuf:"varint,4,opt,name=entity_write_bytes,json=entityWriteBytes" json:"entity_write_bytes,omitempty"` Commitcost *Cost_CommitCost `protobuf:"group,5,opt,name=CommitCost,json=commitcost" json:"commitcost,omitempty"` ApproximateStorageDelta *int32 `protobuf:"varint,8,opt,name=approximate_storage_delta,json=approximateStorageDelta" json:"approximate_storage_delta,omitempty"` IdSequenceUpdates *int32 `protobuf:"varint,9,opt,name=id_sequence_updates,json=idSequenceUpdates" json:"id_sequence_updates,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Cost) Reset() { *m = Cost{} } func (m *Cost) String() string { return proto.CompactTextString(m) } func (*Cost) ProtoMessage() {} func (*Cost) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20} } func (m *Cost) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Cost.Unmarshal(m, b) } func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Cost.Marshal(b, m, deterministic) } func (dst *Cost) XXX_Merge(src proto.Message) { xxx_messageInfo_Cost.Merge(dst, src) } func (m *Cost) XXX_Size() int { return xxx_messageInfo_Cost.Size(m) } func (m *Cost) XXX_DiscardUnknown() { xxx_messageInfo_Cost.DiscardUnknown(m) } var xxx_messageInfo_Cost proto.InternalMessageInfo func (m *Cost) GetIndexWrites() int32 { if m != nil && m.IndexWrites != nil { return *m.IndexWrites } return 0 } func (m *Cost) GetIndexWriteBytes() int32 { if m != nil && m.IndexWriteBytes != nil { return *m.IndexWriteBytes } return 0 } func (m *Cost) GetEntityWrites() int32 { if m != nil && m.EntityWrites != nil { return *m.EntityWrites } return 0 } func (m *Cost) GetEntityWriteBytes() int32 { if m != nil && m.EntityWriteBytes != nil { return *m.EntityWriteBytes } return 0 } func (m *Cost) GetCommitcost() *Cost_CommitCost { if m != nil { return m.Commitcost } return nil } func (m *Cost) GetApproximateStorageDelta() int32 { if m != nil && m.ApproximateStorageDelta != nil { return *m.ApproximateStorageDelta } return 0 } func (m *Cost) GetIdSequenceUpdates() int32 { if m != nil && m.IdSequenceUpdates != nil { return *m.IdSequenceUpdates } return 0 } type Cost_CommitCost struct { RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"` RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} } func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) } func (*Cost_CommitCost) ProtoMessage() {} func (*Cost_CommitCost) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20, 0} } func (m *Cost_CommitCost) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Cost_CommitCost.Unmarshal(m, b) } func (m *Cost_CommitCost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Cost_CommitCost.Marshal(b, m, deterministic) } func (dst *Cost_CommitCost) XXX_Merge(src proto.Message) { xxx_messageInfo_Cost_CommitCost.Merge(dst, src) } func (m *Cost_CommitCost) XXX_Size() int { return xxx_messageInfo_Cost_CommitCost.Size(m) } func (m *Cost_CommitCost) XXX_DiscardUnknown() { xxx_messageInfo_Cost_CommitCost.DiscardUnknown(m) } var xxx_messageInfo_Cost_CommitCost proto.InternalMessageInfo func (m *Cost_CommitCost) GetRequestedEntityPuts() int32 { if m != nil && m.RequestedEntityPuts != nil { return *m.RequestedEntityPuts } return 0 } func (m *Cost_CommitCost) GetRequestedEntityDeletes() int32 { if m != nil && m.RequestedEntityDeletes != nil { return *m.RequestedEntityDeletes } return 0 } type GetRequest struct { Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"` Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"` AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *GetRequest) Reset() { *m = GetRequest{} } func (m *GetRequest) String() string { return proto.CompactTextString(m) } func (*GetRequest) ProtoMessage() {} func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{21} } func (m *GetRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetRequest.Unmarshal(m, b) } func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) } func (dst *GetRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_GetRequest.Merge(dst, src) } func (m *GetRequest) XXX_Size() int { return xxx_messageInfo_GetRequest.Size(m) } func (m *GetRequest) XXX_DiscardUnknown() { xxx_messageInfo_GetRequest.DiscardUnknown(m) } var xxx_messageInfo_GetRequest proto.InternalMessageInfo const Default_GetRequest_AllowDeferred bool = false func (m *GetRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *GetRequest) GetKey() []*Reference { if m != nil { return m.Key } return nil } func (m *GetRequest) GetTransaction() *Transaction { if m != nil { return m.Transaction } return nil } func (m *GetRequest) GetFailoverMs() int64 { if m != nil && m.FailoverMs != nil { return *m.FailoverMs } return 0 } func (m *GetRequest) GetStrong() bool { if m != nil && m.Strong != nil { return *m.Strong } return false } func (m *GetRequest) GetAllowDeferred() bool { if m != nil && m.AllowDeferred != nil { return *m.AllowDeferred } return Default_GetRequest_AllowDeferred } type GetResponse struct { Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"` Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"` InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *GetResponse) Reset() { *m = GetResponse{} } func (m *GetResponse) String() string { return proto.CompactTextString(m) } func (*GetResponse) ProtoMessage() {} func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22} } func (m *GetResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetResponse.Unmarshal(m, b) } func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) } func (dst *GetResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_GetResponse.Merge(dst, src) } func (m *GetResponse) XXX_Size() int { return xxx_messageInfo_GetResponse.Size(m) } func (m *GetResponse) XXX_DiscardUnknown() { xxx_messageInfo_GetResponse.DiscardUnknown(m) } var xxx_messageInfo_GetResponse proto.InternalMessageInfo const Default_GetResponse_InOrder bool = true func (m *GetResponse) GetEntity() []*GetResponse_Entity { if m != nil { return m.Entity } return nil } func (m *GetResponse) GetDeferred() []*Reference { if m != nil { return m.Deferred } return nil } func (m *GetResponse) GetInOrder() bool { if m != nil && m.InOrder != nil { return *m.InOrder } return Default_GetResponse_InOrder } type GetResponse_Entity struct { Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"` Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"` Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} } func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) } func (*GetResponse_Entity) ProtoMessage() {} func (*GetResponse_Entity) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22, 0} } func (m *GetResponse_Entity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetResponse_Entity.Unmarshal(m, b) } func (m *GetResponse_Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GetResponse_Entity.Marshal(b, m, deterministic) } func (dst *GetResponse_Entity) XXX_Merge(src proto.Message) { xxx_messageInfo_GetResponse_Entity.Merge(dst, src) } func (m *GetResponse_Entity) XXX_Size() int { return xxx_messageInfo_GetResponse_Entity.Size(m) } func (m *GetResponse_Entity) XXX_DiscardUnknown() { xxx_messageInfo_GetResponse_Entity.DiscardUnknown(m) } var xxx_messageInfo_GetResponse_Entity proto.InternalMessageInfo func (m *GetResponse_Entity) GetEntity() *EntityProto { if m != nil { return m.Entity } return nil } func (m *GetResponse_Entity) GetKey() *Reference { if m != nil { return m.Key } return nil } func (m *GetResponse_Entity) GetVersion() int64 { if m != nil && m.Version != nil { return *m.Version } return 0 } type PutRequest struct { Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"` Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"` Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PutRequest) Reset() { *m = PutRequest{} } func (m *PutRequest) String() string { return proto.CompactTextString(m) } func (*PutRequest) ProtoMessage() {} func (*PutRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23} } func (m *PutRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PutRequest.Unmarshal(m, b) } func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) } func (dst *PutRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_PutRequest.Merge(dst, src) } func (m *PutRequest) XXX_Size() int { return xxx_messageInfo_PutRequest.Size(m) } func (m *PutRequest) XXX_DiscardUnknown() { xxx_messageInfo_PutRequest.DiscardUnknown(m) } var xxx_messageInfo_PutRequest proto.InternalMessageInfo const Default_PutRequest_Trusted bool = false const Default_PutRequest_Force bool = false const Default_PutRequest_MarkChanges bool = false const Default_PutRequest_AutoIdPolicy PutRequest_AutoIdPolicy = PutRequest_CURRENT func (m *PutRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *PutRequest) GetEntity() []*EntityProto { if m != nil { return m.Entity } return nil } func (m *PutRequest) GetTransaction() *Transaction { if m != nil { return m.Transaction } return nil } func (m *PutRequest) GetCompositeIndex() []*CompositeIndex { if m != nil { return m.CompositeIndex } return nil } func (m *PutRequest) GetTrusted() bool { if m != nil && m.Trusted != nil { return *m.Trusted } return Default_PutRequest_Trusted } func (m *PutRequest) GetForce() bool { if m != nil && m.Force != nil { return *m.Force } return Default_PutRequest_Force } func (m *PutRequest) GetMarkChanges() bool { if m != nil && m.MarkChanges != nil { return *m.MarkChanges } return Default_PutRequest_MarkChanges } func (m *PutRequest) GetSnapshot() []*Snapshot { if m != nil { return m.Snapshot } return nil } func (m *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy { if m != nil && m.AutoIdPolicy != nil { return *m.AutoIdPolicy } return Default_PutRequest_AutoIdPolicy } type PutResponse struct { Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"` Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PutResponse) Reset() { *m = PutResponse{} } func (m *PutResponse) String() string { return proto.CompactTextString(m) } func (*PutResponse) ProtoMessage() {} func (*PutResponse) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{24} } func (m *PutResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PutResponse.Unmarshal(m, b) } func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) } func (dst *PutResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_PutResponse.Merge(dst, src) } func (m *PutResponse) XXX_Size() int { return xxx_messageInfo_PutResponse.Size(m) } func (m *PutResponse) XXX_DiscardUnknown() { xxx_messageInfo_PutResponse.DiscardUnknown(m) } var xxx_messageInfo_PutResponse proto.InternalMessageInfo func (m *PutResponse) GetKey() []*Reference { if m != nil { return m.Key } return nil } func (m *PutResponse) GetCost() *Cost { if m != nil { return m.Cost } return nil } func (m *PutResponse) GetVersion() []int64 { if m != nil { return m.Version } return nil } type TouchRequest struct { Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"` Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *TouchRequest) Reset() { *m = TouchRequest{} } func (m *TouchRequest) String() string { return proto.CompactTextString(m) } func (*TouchRequest) ProtoMessage() {} func (*TouchRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{25} } func (m *TouchRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TouchRequest.Unmarshal(m, b) } func (m *TouchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TouchRequest.Marshal(b, m, deterministic) } func (dst *TouchRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_TouchRequest.Merge(dst, src) } func (m *TouchRequest) XXX_Size() int { return xxx_messageInfo_TouchRequest.Size(m) } func (m *TouchRequest) XXX_DiscardUnknown() { xxx_messageInfo_TouchRequest.DiscardUnknown(m) } var xxx_messageInfo_TouchRequest proto.InternalMessageInfo const Default_TouchRequest_Force bool = false func (m *TouchRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *TouchRequest) GetKey() []*Reference { if m != nil { return m.Key } return nil } func (m *TouchRequest) GetCompositeIndex() []*CompositeIndex { if m != nil { return m.CompositeIndex } return nil } func (m *TouchRequest) GetForce() bool { if m != nil && m.Force != nil { return *m.Force } return Default_TouchRequest_Force } func (m *TouchRequest) GetSnapshot() []*Snapshot { if m != nil { return m.Snapshot } return nil } type TouchResponse struct { Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *TouchResponse) Reset() { *m = TouchResponse{} } func (m *TouchResponse) String() string { return proto.CompactTextString(m) } func (*TouchResponse) ProtoMessage() {} func (*TouchResponse) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{26} } func (m *TouchResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TouchResponse.Unmarshal(m, b) } func (m *TouchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TouchResponse.Marshal(b, m, deterministic) } func (dst *TouchResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_TouchResponse.Merge(dst, src) } func (m *TouchResponse) XXX_Size() int { return xxx_messageInfo_TouchResponse.Size(m) } func (m *TouchResponse) XXX_DiscardUnknown() { xxx_messageInfo_TouchResponse.DiscardUnknown(m) } var xxx_messageInfo_TouchResponse proto.InternalMessageInfo func (m *TouchResponse) GetCost() *Cost { if m != nil { return m.Cost } return nil } type DeleteRequest struct { Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"` Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"` Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{27} } func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) } func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) } func (dst *DeleteRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_DeleteRequest.Merge(dst, src) } func (m *DeleteRequest) XXX_Size() int { return xxx_messageInfo_DeleteRequest.Size(m) } func (m *DeleteRequest) XXX_DiscardUnknown() { xxx_messageInfo_DeleteRequest.DiscardUnknown(m) } var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo const Default_DeleteRequest_Trusted bool = false const Default_DeleteRequest_Force bool = false const Default_DeleteRequest_MarkChanges bool = false func (m *DeleteRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *DeleteRequest) GetKey() []*Reference { if m != nil { return m.Key } return nil } func (m *DeleteRequest) GetTransaction() *Transaction { if m != nil { return m.Transaction } return nil } func (m *DeleteRequest) GetTrusted() bool { if m != nil && m.Trusted != nil { return *m.Trusted } return Default_DeleteRequest_Trusted } func (m *DeleteRequest) GetForce() bool { if m != nil && m.Force != nil { return *m.Force } return Default_DeleteRequest_Force } func (m *DeleteRequest) GetMarkChanges() bool { if m != nil && m.MarkChanges != nil { return *m.MarkChanges } return Default_DeleteRequest_MarkChanges } func (m *DeleteRequest) GetSnapshot() []*Snapshot { if m != nil { return m.Snapshot } return nil } type DeleteResponse struct { Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } func (*DeleteResponse) ProtoMessage() {} func (*DeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{28} } func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) } func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) } func (dst *DeleteResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_DeleteResponse.Merge(dst, src) } func (m *DeleteResponse) XXX_Size() int { return xxx_messageInfo_DeleteResponse.Size(m) } func (m *DeleteResponse) XXX_DiscardUnknown() { xxx_messageInfo_DeleteResponse.DiscardUnknown(m) } var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo func (m *DeleteResponse) GetCost() *Cost { if m != nil { return m.Cost } return nil } func (m *DeleteResponse) GetVersion() []int64 { if m != nil { return m.Version } return nil } type NextRequest struct { Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"` Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"` Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"` Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *NextRequest) Reset() { *m = NextRequest{} } func (m *NextRequest) String() string { return proto.CompactTextString(m) } func (*NextRequest) ProtoMessage() {} func (*NextRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{29} } func (m *NextRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NextRequest.Unmarshal(m, b) } func (m *NextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_NextRequest.Marshal(b, m, deterministic) } func (dst *NextRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_NextRequest.Merge(dst, src) } func (m *NextRequest) XXX_Size() int { return xxx_messageInfo_NextRequest.Size(m) } func (m *NextRequest) XXX_DiscardUnknown() { xxx_messageInfo_NextRequest.DiscardUnknown(m) } var xxx_messageInfo_NextRequest proto.InternalMessageInfo const Default_NextRequest_Offset int32 = 0 const Default_NextRequest_Compile bool = false func (m *NextRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *NextRequest) GetCursor() *Cursor { if m != nil { return m.Cursor } return nil } func (m *NextRequest) GetCount() int32 { if m != nil && m.Count != nil { return *m.Count } return 0 } func (m *NextRequest) GetOffset() int32 { if m != nil && m.Offset != nil { return *m.Offset } return Default_NextRequest_Offset } func (m *NextRequest) GetCompile() bool { if m != nil && m.Compile != nil { return *m.Compile } return Default_NextRequest_Compile } type QueryResult struct { Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"` Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"` SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"` MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"` KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"` SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"` CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"` CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"` Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *QueryResult) Reset() { *m = QueryResult{} } func (m *QueryResult) String() string { return proto.CompactTextString(m) } func (*QueryResult) ProtoMessage() {} func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{30} } func (m *QueryResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryResult.Unmarshal(m, b) } func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) } func (dst *QueryResult) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryResult.Merge(dst, src) } func (m *QueryResult) XXX_Size() int { return xxx_messageInfo_QueryResult.Size(m) } func (m *QueryResult) XXX_DiscardUnknown() { xxx_messageInfo_QueryResult.DiscardUnknown(m) } var xxx_messageInfo_QueryResult proto.InternalMessageInfo func (m *QueryResult) GetCursor() *Cursor { if m != nil { return m.Cursor } return nil } func (m *QueryResult) GetResult() []*EntityProto { if m != nil { return m.Result } return nil } func (m *QueryResult) GetSkippedResults() int32 { if m != nil && m.SkippedResults != nil { return *m.SkippedResults } return 0 } func (m *QueryResult) GetMoreResults() bool { if m != nil && m.MoreResults != nil { return *m.MoreResults } return false } func (m *QueryResult) GetKeysOnly() bool { if m != nil && m.KeysOnly != nil { return *m.KeysOnly } return false } func (m *QueryResult) GetIndexOnly() bool { if m != nil && m.IndexOnly != nil { return *m.IndexOnly } return false } func (m *QueryResult) GetSmallOps() bool { if m != nil && m.SmallOps != nil { return *m.SmallOps } return false } func (m *QueryResult) GetCompiledQuery() *CompiledQuery { if m != nil { return m.CompiledQuery } return nil } func (m *QueryResult) GetCompiledCursor() *CompiledCursor { if m != nil { return m.CompiledCursor } return nil } func (m *QueryResult) GetIndex() []*CompositeIndex { if m != nil { return m.Index } return nil } func (m *QueryResult) GetVersion() []int64 { if m != nil { return m.Version } return nil } type AllocateIdsRequest struct { Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"` Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"` Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } func (*AllocateIdsRequest) ProtoMessage() {} func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{31} } func (m *AllocateIdsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AllocateIdsRequest.Unmarshal(m, b) } func (m *AllocateIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_AllocateIdsRequest.Marshal(b, m, deterministic) } func (dst *AllocateIdsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_AllocateIdsRequest.Merge(dst, src) } func (m *AllocateIdsRequest) XXX_Size() int { return xxx_messageInfo_AllocateIdsRequest.Size(m) } func (m *AllocateIdsRequest) XXX_DiscardUnknown() { xxx_messageInfo_AllocateIdsRequest.DiscardUnknown(m) } var xxx_messageInfo_AllocateIdsRequest proto.InternalMessageInfo func (m *AllocateIdsRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *AllocateIdsRequest) GetModelKey() *Reference { if m != nil { return m.ModelKey } return nil } func (m *AllocateIdsRequest) GetSize() int64 { if m != nil && m.Size != nil { return *m.Size } return 0 } func (m *AllocateIdsRequest) GetMax() int64 { if m != nil && m.Max != nil { return *m.Max } return 0 } func (m *AllocateIdsRequest) GetReserve() []*Reference { if m != nil { return m.Reserve } return nil } type AllocateIdsResponse struct { Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"` End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"` Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } func (*AllocateIdsResponse) ProtoMessage() {} func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{32} } func (m *AllocateIdsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AllocateIdsResponse.Unmarshal(m, b) } func (m *AllocateIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_AllocateIdsResponse.Marshal(b, m, deterministic) } func (dst *AllocateIdsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_AllocateIdsResponse.Merge(dst, src) } func (m *AllocateIdsResponse) XXX_Size() int { return xxx_messageInfo_AllocateIdsResponse.Size(m) } func (m *AllocateIdsResponse) XXX_DiscardUnknown() { xxx_messageInfo_AllocateIdsResponse.DiscardUnknown(m) } var xxx_messageInfo_AllocateIdsResponse proto.InternalMessageInfo func (m *AllocateIdsResponse) GetStart() int64 { if m != nil && m.Start != nil { return *m.Start } return 0 } func (m *AllocateIdsResponse) GetEnd() int64 { if m != nil && m.End != nil { return *m.End } return 0 } func (m *AllocateIdsResponse) GetCost() *Cost { if m != nil { return m.Cost } return nil } type CompositeIndices struct { Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CompositeIndices) Reset() { *m = CompositeIndices{} } func (m *CompositeIndices) String() string { return proto.CompactTextString(m) } func (*CompositeIndices) ProtoMessage() {} func (*CompositeIndices) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{33} } func (m *CompositeIndices) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CompositeIndices.Unmarshal(m, b) } func (m *CompositeIndices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CompositeIndices.Marshal(b, m, deterministic) } func (dst *CompositeIndices) XXX_Merge(src proto.Message) { xxx_messageInfo_CompositeIndices.Merge(dst, src) } func (m *CompositeIndices) XXX_Size() int { return xxx_messageInfo_CompositeIndices.Size(m) } func (m *CompositeIndices) XXX_DiscardUnknown() { xxx_messageInfo_CompositeIndices.DiscardUnknown(m) } var xxx_messageInfo_CompositeIndices proto.InternalMessageInfo func (m *CompositeIndices) GetIndex() []*CompositeIndex { if m != nil { return m.Index } return nil } type AddActionsRequest struct { Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} } func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) } func (*AddActionsRequest) ProtoMessage() {} func (*AddActionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{34} } func (m *AddActionsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddActionsRequest.Unmarshal(m, b) } func (m *AddActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_AddActionsRequest.Marshal(b, m, deterministic) } func (dst *AddActionsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_AddActionsRequest.Merge(dst, src) } func (m *AddActionsRequest) XXX_Size() int { return xxx_messageInfo_AddActionsRequest.Size(m) } func (m *AddActionsRequest) XXX_DiscardUnknown() { xxx_messageInfo_AddActionsRequest.DiscardUnknown(m) } var xxx_messageInfo_AddActionsRequest proto.InternalMessageInfo func (m *AddActionsRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *AddActionsRequest) GetTransaction() *Transaction { if m != nil { return m.Transaction } return nil } func (m *AddActionsRequest) GetAction() []*Action { if m != nil { return m.Action } return nil } type AddActionsResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} } func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) } func (*AddActionsResponse) ProtoMessage() {} func (*AddActionsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{35} } func (m *AddActionsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddActionsResponse.Unmarshal(m, b) } func (m *AddActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_AddActionsResponse.Marshal(b, m, deterministic) } func (dst *AddActionsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_AddActionsResponse.Merge(dst, src) } func (m *AddActionsResponse) XXX_Size() int { return xxx_messageInfo_AddActionsResponse.Size(m) } func (m *AddActionsResponse) XXX_DiscardUnknown() { xxx_messageInfo_AddActionsResponse.DiscardUnknown(m) } var xxx_messageInfo_AddActionsResponse proto.InternalMessageInfo type BeginTransactionRequest struct { Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"` DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"` Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"` PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } func (*BeginTransactionRequest) ProtoMessage() {} func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36} } func (m *BeginTransactionRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BeginTransactionRequest.Unmarshal(m, b) } func (m *BeginTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BeginTransactionRequest.Marshal(b, m, deterministic) } func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_BeginTransactionRequest.Merge(dst, src) } func (m *BeginTransactionRequest) XXX_Size() int { return xxx_messageInfo_BeginTransactionRequest.Size(m) } func (m *BeginTransactionRequest) XXX_DiscardUnknown() { xxx_messageInfo_BeginTransactionRequest.DiscardUnknown(m) } var xxx_messageInfo_BeginTransactionRequest proto.InternalMessageInfo const Default_BeginTransactionRequest_AllowMultipleEg bool = false const Default_BeginTransactionRequest_Mode BeginTransactionRequest_TransactionMode = BeginTransactionRequest_UNKNOWN func (m *BeginTransactionRequest) GetHeader() *InternalHeader { if m != nil { return m.Header } return nil } func (m *BeginTransactionRequest) GetApp() string { if m != nil && m.App != nil { return *m.App } return "" } func (m *BeginTransactionRequest) GetAllowMultipleEg() bool { if m != nil && m.AllowMultipleEg != nil { return *m.AllowMultipleEg } return Default_BeginTransactionRequest_AllowMultipleEg } func (m *BeginTransactionRequest) GetDatabaseId() string { if m != nil && m.DatabaseId != nil { return *m.DatabaseId } return "" } func (m *BeginTransactionRequest) GetMode() BeginTransactionRequest_TransactionMode { if m != nil && m.Mode != nil { return *m.Mode } return Default_BeginTransactionRequest_Mode } func (m *BeginTransactionRequest) GetPreviousTransaction() *Transaction { if m != nil { return m.PreviousTransaction } return nil } type CommitResponse struct { Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CommitResponse) Reset() { *m = CommitResponse{} } func (m *CommitResponse) String() string { return proto.CompactTextString(m) } func (*CommitResponse) ProtoMessage() {} func (*CommitResponse) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37} } func (m *CommitResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommitResponse.Unmarshal(m, b) } func (m *CommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CommitResponse.Marshal(b, m, deterministic) } func (dst *CommitResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitResponse.Merge(dst, src) } func (m *CommitResponse) XXX_Size() int { return xxx_messageInfo_CommitResponse.Size(m) } func (m *CommitResponse) XXX_DiscardUnknown() { xxx_messageInfo_CommitResponse.DiscardUnknown(m) } var xxx_messageInfo_CommitResponse proto.InternalMessageInfo func (m *CommitResponse) GetCost() *Cost { if m != nil { return m.Cost } return nil } func (m *CommitResponse) GetVersion() []*CommitResponse_Version { if m != nil { return m.Version } return nil } type CommitResponse_Version struct { RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"` Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} } func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) } func (*CommitResponse_Version) ProtoMessage() {} func (*CommitResponse_Version) Descriptor() ([]byte, []int) { return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37, 0} } func (m *CommitResponse_Version) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommitResponse_Version.Unmarshal(m, b) } func (m *CommitResponse_Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CommitResponse_Version.Marshal(b, m, deterministic) } func (dst *CommitResponse_Version) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitResponse_Version.Merge(dst, src) } func (m *CommitResponse_Version) XXX_Size() int { return xxx_messageInfo_CommitResponse_Version.Size(m) } func (m *CommitResponse_Version) XXX_DiscardUnknown() { xxx_messageInfo_CommitResponse_Version.DiscardUnknown(m) } var xxx_messageInfo_CommitResponse_Version proto.InternalMessageInfo func (m *CommitResponse_Version) GetRootEntityKey() *Reference { if m != nil { return m.RootEntityKey } return nil } func (m *CommitResponse_Version) GetVersion() int64 { if m != nil && m.Version != nil { return *m.Version } return 0 } func init() { proto.RegisterType((*Action)(nil), "appengine.Action") proto.RegisterType((*PropertyValue)(nil), "appengine.PropertyValue") proto.RegisterType((*PropertyValue_PointValue)(nil), "appengine.PropertyValue.PointValue") proto.RegisterType((*PropertyValue_UserValue)(nil), "appengine.PropertyValue.UserValue") proto.RegisterType((*PropertyValue_ReferenceValue)(nil), "appengine.PropertyValue.ReferenceValue") proto.RegisterType((*PropertyValue_ReferenceValue_PathElement)(nil), "appengine.PropertyValue.ReferenceValue.PathElement") proto.RegisterType((*Property)(nil), "appengine.Property") proto.RegisterType((*Path)(nil), "appengine.Path") proto.RegisterType((*Path_Element)(nil), "appengine.Path.Element") proto.RegisterType((*Reference)(nil), "appengine.Reference") proto.RegisterType((*User)(nil), "appengine.User") proto.RegisterType((*EntityProto)(nil), "appengine.EntityProto") proto.RegisterType((*CompositeProperty)(nil), "appengine.CompositeProperty") proto.RegisterType((*Index)(nil), "appengine.Index") proto.RegisterType((*Index_Property)(nil), "appengine.Index.Property") proto.RegisterType((*CompositeIndex)(nil), "appengine.CompositeIndex") proto.RegisterType((*IndexPostfix)(nil), "appengine.IndexPostfix") proto.RegisterType((*IndexPostfix_IndexValue)(nil), "appengine.IndexPostfix.IndexValue") proto.RegisterType((*IndexPosition)(nil), "appengine.IndexPosition") proto.RegisterType((*Snapshot)(nil), "appengine.Snapshot") proto.RegisterType((*InternalHeader)(nil), "appengine.InternalHeader") proto.RegisterType((*Transaction)(nil), "appengine.Transaction") proto.RegisterType((*Query)(nil), "appengine.Query") proto.RegisterType((*Query_Filter)(nil), "appengine.Query.Filter") proto.RegisterType((*Query_Order)(nil), "appengine.Query.Order") proto.RegisterType((*CompiledQuery)(nil), "appengine.CompiledQuery") proto.RegisterType((*CompiledQuery_PrimaryScan)(nil), "appengine.CompiledQuery.PrimaryScan") proto.RegisterType((*CompiledQuery_MergeJoinScan)(nil), "appengine.CompiledQuery.MergeJoinScan") proto.RegisterType((*CompiledQuery_EntityFilter)(nil), "appengine.CompiledQuery.EntityFilter") proto.RegisterType((*CompiledCursor)(nil), "appengine.CompiledCursor") proto.RegisterType((*CompiledCursor_Position)(nil), "appengine.CompiledCursor.Position") proto.RegisterType((*CompiledCursor_Position_IndexValue)(nil), "appengine.CompiledCursor.Position.IndexValue") proto.RegisterType((*Cursor)(nil), "appengine.Cursor") proto.RegisterType((*Error)(nil), "appengine.Error") proto.RegisterType((*Cost)(nil), "appengine.Cost") proto.RegisterType((*Cost_CommitCost)(nil), "appengine.Cost.CommitCost") proto.RegisterType((*GetRequest)(nil), "appengine.GetRequest") proto.RegisterType((*GetResponse)(nil), "appengine.GetResponse") proto.RegisterType((*GetResponse_Entity)(nil), "appengine.GetResponse.Entity") proto.RegisterType((*PutRequest)(nil), "appengine.PutRequest") proto.RegisterType((*PutResponse)(nil), "appengine.PutResponse") proto.RegisterType((*TouchRequest)(nil), "appengine.TouchRequest") proto.RegisterType((*TouchResponse)(nil), "appengine.TouchResponse") proto.RegisterType((*DeleteRequest)(nil), "appengine.DeleteRequest") proto.RegisterType((*DeleteResponse)(nil), "appengine.DeleteResponse") proto.RegisterType((*NextRequest)(nil), "appengine.NextRequest") proto.RegisterType((*QueryResult)(nil), "appengine.QueryResult") proto.RegisterType((*AllocateIdsRequest)(nil), "appengine.AllocateIdsRequest") proto.RegisterType((*AllocateIdsResponse)(nil), "appengine.AllocateIdsResponse") proto.RegisterType((*CompositeIndices)(nil), "appengine.CompositeIndices") proto.RegisterType((*AddActionsRequest)(nil), "appengine.AddActionsRequest") proto.RegisterType((*AddActionsResponse)(nil), "appengine.AddActionsResponse") proto.RegisterType((*BeginTransactionRequest)(nil), "appengine.BeginTransactionRequest") proto.RegisterType((*CommitResponse)(nil), "appengine.CommitResponse") proto.RegisterType((*CommitResponse_Version)(nil), "appengine.CommitResponse.Version") } func init() { proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor_datastore_v3_83b17b80c34f6179) } var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{ // 4156 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46, 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d, 0xd9, 0x6b, 0x73, 0x6c, 0xf9, 0x23, 0x5b, 0x4a, 0x76, 0x1d, 0x4a, 0xc4, 0x68, 0x90, 0xa1, 0x48, 0xb9, 0x09, 0xd9, 0x9e, 0x5c, 0x50, 0x18, 0xa2, 0x29, 0x21, 0x43, 0x02, 0x30, 0x00, 0x6a, 0x46, 0x93, 0xe4, 0x90, 0x4b, 0x2a, 0x55, 0x5b, 0xa9, 0x1c, 0x92, 0x4a, 0x25, 0xf9, 0x07, 0x72, 0xc8, 0x39, 0x95, 0xaa, 0x54, 0xf6, 0x98, 0x5b, 0x0e, 0x7b, 0xc9, 0x31, 0x95, 0x73, 0xf2, 0x27, 0x24, 0x39, 0xa4, 0xfa, 0x75, 0x03, 0x02, 0x28, 0x4a, 0x23, 0x6d, 0xf6, 0x90, 0x13, 0xd1, 0xef, 0xfd, 0xba, 0xf1, 0xfa, 0xf5, 0xfb, 0x6c, 0x10, 0xba, 0xc7, 0xbe, 0x7f, 0x3c, 0x65, 0x9d, 0x63, 0x7f, 0x6a, 0x7b, 0xc7, 0x1d, 0x3f, 0x3c, 0x7e, 0x68, 0x07, 0x01, 0xf3, 0x8e, 0x5d, 0x8f, 0x3d, 0x74, 0xbd, 0x98, 0x85, 0x9e, 0x3d, 0x7d, 0xe8, 0xd8, 0xb1, 0x1d, 0xc5, 0x7e, 0xc8, 0xce, 0x9f, 0xac, 0xd3, 0xcf, 0x3b, 0x41, 0xe8, 0xc7, 0x3e, 0xa9, 0xa7, 0x13, 0xb4, 0x1a, 0x54, 0xba, 0xe3, 0xd8, 0xf5, 0x3d, 0xed, 0x1f, 0x2b, 0xb0, 0x7a, 0x18, 0xfa, 0x01, 0x0b, 0xe3, 0xb3, 0x6f, 0xed, 0xe9, 0x9c, 0x91, 0x77, 0x00, 0x5c, 0x2f, 0xfe, 0xea, 0x0b, 0x1c, 0xb5, 0x0a, 0x9b, 0x85, 0xad, 0x22, 0xcd, 0x50, 0x88, 0x06, 0x2b, 0xcf, 0x7c, 0x7f, 0xca, 0x6c, 0x4f, 0x20, 0x94, 0xcd, 0xc2, 0x56, 0x8d, 0xe6, 0x68, 0x64, 0x13, 0x1a, 0x51, 0x1c, 0xba, 0xde, 0xb1, 0x80, 0x14, 0x37, 0x0b, 0x5b, 0x75, 0x9a, 0x25, 0x71, 0x84, 0xe3, 0xcf, 0x9f, 0x4d, 0x99, 0x40, 0x94, 0x36, 0x0b, 0x5b, 0x05, 0x9a, 0x25, 0x91, 0x3d, 0x80, 0xc0, 0x77, 0xbd, 0xf8, 0x14, 0x01, 0xe5, 0xcd, 0xc2, 0x16, 0x6c, 0x3f, 0xe8, 0xa4, 0x7b, 0xe8, 0xe4, 0xa4, 0xee, 0x1c, 0x72, 0x28, 0x3e, 0xd2, 0xcc, 0x34, 0xf2, 0xdb, 0x50, 0x9f, 0x47, 0x2c, 0x14, 0x6b, 0xd4, 0x70, 0x0d, 0xed, 0xd2, 0x35, 0x8e, 0x22, 0x16, 0x8a, 0x25, 0xce, 0x27, 0x91, 0x21, 0x34, 0x43, 0x36, 0x61, 0x21, 0xf3, 0xc6, 0x4c, 0x2c, 0xb3, 0x82, 0xcb, 0x7c, 0x70, 0xe9, 0x32, 0x34, 0x81, 0x8b, 0xb5, 0x16, 0xa6, 0xb7, 0xb7, 0x00, 0xce, 0x85, 0x25, 0x2b, 0x50, 0x78, 0xd9, 0xaa, 0x6c, 0x2a, 0x5b, 0x05, 0x5a, 0x78, 0xc9, 0x47, 0x67, 0xad, 0xaa, 0x18, 0x9d, 0xb5, 0xff, 0xa9, 0x00, 0xf5, 0x54, 0x26, 0x72, 0x0b, 0xca, 0x6c, 0x66, 0xbb, 0xd3, 0x56, 0x7d, 0x53, 0xd9, 0xaa, 0x53, 0x31, 0x20, 0xf7, 0xa1, 0x61, 0xcf, 0xe3, 0x13, 0xcb, 0xf1, 0x67, 0xb6, 0xeb, 0xb5, 0x00, 0x79, 0xc0, 0x49, 0x3d, 0xa4, 0x90, 0x36, 0xd4, 0x3c, 0x77, 0xfc, 0xdc, 0xb3, 0x67, 0xac, 0xd5, 0xc0, 0x73, 0x48, 0xc7, 0xe4, 0x13, 0x20, 0x13, 0xe6, 0xb0, 0xd0, 0x8e, 0x99, 0x63, 0xb9, 0x0e, 0xf3, 0x62, 0x37, 0x3e, 0x6b, 0xdd, 0x46, 0xd4, 0x7a, 0xca, 0x31, 0x24, 0x23, 0x0f, 0x0f, 0x42, 0xff, 0xd4, 0x75, 0x58, 0xd8, 0xba, 0xb3, 0x00, 0x3f, 0x94, 0x8c, 0xf6, 0xbf, 0x17, 0xa0, 0x99, 0xd7, 0x05, 0x51, 0xa1, 0x68, 0x07, 0x41, 0x6b, 0x15, 0xa5, 0xe4, 0x8f, 0xe4, 0x6d, 0x00, 0x2e, 0x8a, 0x15, 0x05, 0xf6, 0x98, 0xb5, 0x6e, 0xe1, 0x5a, 0x75, 0x4e, 0x19, 0x71, 0x02, 0x39, 0x82, 0x46, 0x60, 0xc7, 0x27, 0x6c, 0xca, 0x66, 0xcc, 0x8b, 0x5b, 0xcd, 0xcd, 0xe2, 0x16, 0x6c, 0x7f, 0x7e, 0x4d, 0xd5, 0x77, 0x0e, 0xed, 0xf8, 0x44, 0x17, 0x53, 0x69, 0x76, 0x9d, 0xb6, 0x0e, 0x8d, 0x0c, 0x8f, 0x10, 0x28, 0xc5, 0x67, 0x01, 0x6b, 0xad, 0xa1, 0x5c, 0xf8, 0x4c, 0x9a, 0xa0, 0xb8, 0x4e, 0x4b, 0x45, 0xf3, 0x57, 0x5c, 0x87, 0x63, 0x50, 0x87, 0xeb, 0x28, 0x22, 0x3e, 0x6b, 0xff, 0x51, 0x86, 0x5a, 0x22, 0x00, 0xe9, 0x42, 0x75, 0xc6, 0x6c, 0xcf, 0xf5, 0x8e, 0xd1, 0x69, 0x9a, 0xdb, 0x6f, 0x2e, 0x11, 0xb3, 0x73, 0x20, 0x20, 0x3b, 0x30, 0x18, 0x5a, 0x07, 0x7a, 0x77, 0x60, 0x0c, 0xf6, 0x69, 0x32, 0x8f, 0x1f, 0xa6, 0x7c, 0xb4, 0xe6, 0xa1, 0x8b, 0x9e, 0x55, 0xa7, 0x20, 0x49, 0x47, 0xa1, 0x9b, 0x0a, 0x51, 0x14, 0x82, 0xe2, 0x21, 0x76, 0xa0, 0x9c, 0xb8, 0x88, 0xb2, 0xd5, 0xd8, 0x6e, 0x5d, 0xa6, 0x1c, 0x2a, 0x60, 0xdc, 0x20, 0x66, 0xf3, 0x69, 0xec, 0x06, 0x53, 0xee, 0x76, 0xca, 0x56, 0x8d, 0xa6, 0x63, 0xf2, 0x1e, 0x40, 0xc4, 0xec, 0x70, 0x7c, 0x62, 0x3f, 0x9b, 0xb2, 0x56, 0x85, 0x7b, 0xf6, 0x4e, 0x79, 0x62, 0x4f, 0x23, 0x46, 0x33, 0x0c, 0x62, 0xc3, 0xdd, 0x49, 0x1c, 0x59, 0xb1, 0xff, 0x9c, 0x79, 0xee, 0x2b, 0x9b, 0x07, 0x12, 0xcb, 0x0f, 0xf8, 0x0f, 0xfa, 0x58, 0x73, 0xfb, 0xc3, 0x65, 0x5b, 0x7f, 0x14, 0x47, 0x66, 0x66, 0xc6, 0x10, 0x27, 0xd0, 0xdb, 0x93, 0x65, 0x64, 0xd2, 0x86, 0xca, 0xd4, 0x1f, 0xdb, 0x53, 0xd6, 0xaa, 0x73, 0x2d, 0xec, 0x28, 0xcc, 0xa3, 0x92, 0xa2, 0xfd, 0xb3, 0x02, 0x55, 0xa9, 0x47, 0xd2, 0x84, 0x8c, 0x26, 0xd5, 0x37, 0x48, 0x0d, 0x4a, 0xbb, 0xfd, 0xe1, 0xae, 0xda, 0xe4, 0x4f, 0xa6, 0xfe, 0xbd, 0xa9, 0xae, 0x71, 0xcc, 0xee, 0x53, 0x53, 0x1f, 0x99, 0x94, 0x63, 0x54, 0xb2, 0x0e, 0xab, 0x5d, 0x73, 0x78, 0x60, 0xed, 0x75, 0x4d, 0x7d, 0x7f, 0x48, 0x9f, 0xaa, 0x05, 0xb2, 0x0a, 0x75, 0x24, 0xf5, 0x8d, 0xc1, 0x13, 0x55, 0xe1, 0x33, 0x70, 0x68, 0x1a, 0x66, 0x5f, 0x57, 0x8b, 0x44, 0x85, 0x15, 0x31, 0x63, 0x38, 0x30, 0xf5, 0x81, 0xa9, 0x96, 0x52, 0xca, 0xe8, 0xe8, 0xe0, 0xa0, 0x4b, 0x9f, 0xaa, 0x65, 0xb2, 0x06, 0x0d, 0xa4, 0x74, 0x8f, 0xcc, 0xc7, 0x43, 0xaa, 0x56, 0x48, 0x03, 0xaa, 0xfb, 0x3d, 0xeb, 0xbb, 0xc7, 0xfa, 0x40, 0xad, 0x92, 0x15, 0xa8, 0xed, 0xf7, 0x2c, 0xfd, 0xa0, 0x6b, 0xf4, 0xd5, 0x1a, 0x9f, 0xbd, 0xaf, 0x0f, 0xe9, 0x68, 0x64, 0x1d, 0x0e, 0x8d, 0x81, 0xa9, 0xd6, 0x49, 0x1d, 0xca, 0xfb, 0x3d, 0xcb, 0x38, 0x50, 0x81, 0x10, 0x68, 0xee, 0xf7, 0xac, 0xc3, 0xc7, 0xc3, 0x81, 0x3e, 0x38, 0x3a, 0xd8, 0xd5, 0xa9, 0xda, 0x20, 0xb7, 0x40, 0xe5, 0xb4, 0xe1, 0xc8, 0xec, 0xf6, 0xbb, 0xbd, 0x1e, 0xd5, 0x47, 0x23, 0x75, 0x85, 0x4b, 0xbd, 0xdf, 0xb3, 0x68, 0xd7, 0xe4, 0xfb, 0x5a, 0xe5, 0x2f, 0xe4, 0x7b, 0x7f, 0xa2, 0x3f, 0x55, 0xd7, 0xf9, 0x2b, 0xf4, 0x81, 0x69, 0x98, 0x4f, 0xad, 0x43, 0x3a, 0x34, 0x87, 0xea, 0x06, 0x17, 0xd0, 0x18, 0xf4, 0xf4, 0xef, 0xad, 0x6f, 0xbb, 0xfd, 0x23, 0x5d, 0x25, 0xda, 0x8f, 0xe1, 0xf6, 0xd2, 0x33, 0xe1, 0xaa, 0x7b, 0x6c, 0x1e, 0xf4, 0xd5, 0x02, 0x7f, 0xe2, 0x9b, 0x52, 0x15, 0xed, 0x0f, 0xa0, 0xc4, 0x5d, 0x86, 0x7c, 0x06, 0xd5, 0xc4, 0x1b, 0x0b, 0xe8, 0x8d, 0x77, 0xb3, 0x67, 0x6d, 0xc7, 0x27, 0x9d, 0xc4, 0xe3, 0x12, 0x5c, 0xbb, 0x0b, 0xd5, 0x45, 0x4f, 0x53, 0x2e, 0x78, 0x5a, 0xf1, 0x82, 0xa7, 0x95, 0x32, 0x9e, 0x66, 0x43, 0x3d, 0xf5, 0xed, 0x9b, 0x47, 0x91, 0x07, 0x50, 0xe2, 0xde, 0xdf, 0x6a, 0xa2, 0x87, 0xac, 0x2d, 0x08, 0x4c, 0x91, 0xa9, 0xfd, 0x43, 0x01, 0x4a, 0x3c, 0xda, 0x9e, 0x07, 0xda, 0xc2, 0x15, 0x81, 0x56, 0xb9, 0x32, 0xd0, 0x16, 0xaf, 0x15, 0x68, 0x2b, 0x37, 0x0b, 0xb4, 0xd5, 0x4b, 0x02, 0xad, 0xf6, 0x67, 0x45, 0x68, 0xe8, 0x38, 0xf3, 0x10, 0x13, 0xfd, 0xfb, 0x50, 0x7c, 0xce, 0xce, 0x50, 0x3f, 0x8d, 0xed, 0x5b, 0x99, 0xdd, 0xa6, 0x2a, 0xa4, 0x1c, 0x40, 0xb6, 0x61, 0x45, 0xbc, 0xd0, 0x3a, 0x0e, 0xfd, 0x79, 0xd0, 0x52, 0x97, 0xab, 0xa7, 0x21, 0x40, 0xfb, 0x1c, 0x43, 0xde, 0x83, 0xb2, 0xff, 0xc2, 0x63, 0x21, 0xc6, 0xc1, 0x3c, 0x98, 0x2b, 0x8f, 0x0a, 0x2e, 0x79, 0x08, 0xa5, 0xe7, 0xae, 0xe7, 0xe0, 0x19, 0xe6, 0x23, 0x61, 0x46, 0xd0, 0xce, 0x13, 0xd7, 0x73, 0x28, 0x02, 0xc9, 0x3d, 0xa8, 0xf1, 0x5f, 0x8c, 0x7b, 0x65, 0xdc, 0x68, 0x95, 0x8f, 0x79, 0xd0, 0x7b, 0x08, 0xb5, 0x40, 0xc6, 0x10, 0x4c, 0x00, 0x8d, 0xed, 0x8d, 0x25, 0xe1, 0x85, 0xa6, 0x20, 0xf2, 0x15, 0xac, 0x84, 0xf6, 0x0b, 0x2b, 0x9d, 0xb4, 0x76, 0xf9, 0xa4, 0x46, 0x68, 0xbf, 0x48, 0x23, 0x38, 0x81, 0x52, 0x68, 0x7b, 0xcf, 0x5b, 0x64, 0xb3, 0xb0, 0x55, 0xa6, 0xf8, 0xac, 0x7d, 0x01, 0x25, 0x2e, 0x25, 0x8f, 0x08, 0xfb, 0x3d, 0xf4, 0xff, 0xee, 0x9e, 0xa9, 0x16, 0x12, 0x7f, 0xfe, 0x96, 0x47, 0x03, 0x45, 0x72, 0x0f, 0xf4, 0xd1, 0xa8, 0xbb, 0xaf, 0xab, 0x45, 0xad, 0x07, 0xeb, 0x7b, 0xfe, 0x2c, 0xf0, 0x23, 0x37, 0x66, 0xe9, 0xf2, 0xf7, 0xa0, 0xe6, 0x7a, 0x0e, 0x7b, 0x69, 0xb9, 0x0e, 0x9a, 0x56, 0x91, 0x56, 0x71, 0x6c, 0x38, 0xdc, 0xe4, 0x4e, 0x65, 0x31, 0x55, 0xe4, 0x26, 0x87, 0x03, 0xed, 0x2f, 0x15, 0x28, 0x1b, 0x1c, 0xc1, 0x8d, 0x4f, 0x9e, 0x14, 0x7a, 0x8f, 0x30, 0x4c, 0x10, 0x24, 0x93, 0xfb, 0x50, 0x1b, 0x6a, 0xb6, 0x37, 0x66, 0xbc, 0xe2, 0xc3, 0x3c, 0x50, 0xa3, 0xe9, 0x98, 0x7c, 0x99, 0xd1, 0x9f, 0x82, 0x2e, 0x7b, 0x2f, 0xa3, 0x0a, 0x7c, 0xc1, 0x12, 0x2d, 0xb6, 0xff, 0xaa, 0x90, 0x49, 0x6e, 0xcb, 0x12, 0x4f, 0x1f, 0xea, 0x8e, 0x1b, 0x32, 0xac, 0x23, 0xe5, 0x41, 0x3f, 0xb8, 0x74, 0xe1, 0x4e, 0x2f, 0x81, 0xee, 0xd4, 0xbb, 0xa3, 0x3d, 0x7d, 0xd0, 0xe3, 0x99, 0xef, 0x7c, 0x01, 0xed, 0x23, 0xa8, 0xa7, 0x10, 0x0c, 0xc7, 0x09, 0x48, 0x2d, 0x70, 0xf5, 0xf6, 0xf4, 0x74, 0xac, 0x68, 0x7f, 0xad, 0x40, 0x33, 0xd5, 0xaf, 0xd0, 0xd0, 0x6d, 0xa8, 0xd8, 0x41, 0x90, 0xa8, 0xb6, 0x4e, 0xcb, 0x76, 0x10, 0x18, 0x8e, 0x8c, 0x2d, 0x0a, 0x6a, 0x9b, 0xc7, 0x96, 0x4f, 0x01, 0x1c, 0x36, 0x71, 0x3d, 0x17, 0x85, 0x2e, 0xa2, 0xc1, 0xab, 0x8b, 0x42, 0xd3, 0x0c, 0x86, 0x7c, 0x09, 0xe5, 0x28, 0xb6, 0x63, 0x91, 0x2b, 0x9b, 0xdb, 0xf7, 0x33, 0xe0, 0xbc, 0x08, 0x9d, 0x11, 0x87, 0x51, 0x81, 0x26, 0x5f, 0xc1, 0x2d, 0xdf, 0x9b, 0x9e, 0x59, 0xf3, 0x88, 0x59, 0xee, 0xc4, 0x0a, 0xd9, 0x0f, 0x73, 0x37, 0x64, 0x4e, 0x3e, 0xa7, 0xae, 0x73, 0xc8, 0x51, 0xc4, 0x8c, 0x09, 0x95, 0x7c, 0xed, 0x6b, 0x28, 0xe3, 0x3a, 0x7c, 0xcf, 0xdf, 0x51, 0xc3, 0xd4, 0xad, 0xe1, 0xa0, 0xff, 0x54, 0xe8, 0x80, 0xea, 0xdd, 0x9e, 0x85, 0x44, 0x55, 0xe1, 0xc1, 0xbe, 0xa7, 0xf7, 0x75, 0x53, 0xef, 0xa9, 0x45, 0x9e, 0x3d, 0x74, 0x4a, 0x87, 0x54, 0x2d, 0x69, 0xff, 0x53, 0x80, 0x15, 0x94, 0xe7, 0xd0, 0x8f, 0xe2, 0x89, 0xfb, 0x92, 0xec, 0x41, 0x43, 0x98, 0xdd, 0xa9, 0x2c, 0xe8, 0xb9, 0x33, 0x68, 0x8b, 0x7b, 0x96, 0x68, 0x31, 0x90, 0x75, 0xb4, 0x9b, 0x3e, 0x27, 0x21, 0x45, 0x41, 0xa7, 0xbf, 0x22, 0xa4, 0xbc, 0x05, 0x95, 0x67, 0x6c, 0xe2, 0x87, 0x22, 0x04, 0xd6, 0x76, 0x4a, 0x71, 0x38, 0x67, 0x54, 0xd2, 0xda, 0x36, 0xc0, 0xf9, 0xfa, 0xe4, 0x01, 0xac, 0x26, 0xc6, 0x66, 0xa1, 0x71, 0x89, 0x93, 0x5b, 0x49, 0x88, 0x83, 0x5c, 0x75, 0xa3, 0x5c, 0xab, 0xba, 0xd1, 0xbe, 0x86, 0xd5, 0x64, 0x3f, 0xe2, 0xfc, 0x54, 0x21, 0x79, 0x01, 0x63, 0xca, 0x82, 0x8c, 0xca, 0x45, 0x19, 0xb5, 0x9f, 0x41, 0x6d, 0xe4, 0xd9, 0x41, 0x74, 0xe2, 0xc7, 0xdc, 0x7a, 0xe2, 0x48, 0xfa, 0xaa, 0x12, 0x47, 0x9a, 0x06, 0x15, 0x7e, 0x38, 0xf3, 0x88, 0xbb, 0xbf, 0x31, 0xe8, 0xee, 0x99, 0xc6, 0xb7, 0xba, 0xfa, 0x06, 0x01, 0xa8, 0xc8, 0xe7, 0x82, 0xa6, 0x41, 0xd3, 0x90, 0xed, 0xd8, 0x63, 0x66, 0x3b, 0x2c, 0xe4, 0x12, 0xfc, 0xe0, 0x47, 0x89, 0x04, 0x3f, 0xf8, 0x91, 0xf6, 0x17, 0x05, 0x68, 0x98, 0xa1, 0xed, 0x45, 0xb6, 0x30, 0xf7, 0xcf, 0xa0, 0x72, 0x82, 0x58, 0x74, 0xa3, 0xc6, 0x82, 0x7f, 0x66, 0x17, 0xa3, 0x12, 0x48, 0xee, 0x40, 0xe5, 0xc4, 0xf6, 0x9c, 0xa9, 0xd0, 0x5a, 0x85, 0xca, 0x51, 0x92, 0x1b, 0x95, 0xf3, 0xdc, 0xb8, 0x05, 0x2b, 0x33, 0x3b, 0x7c, 0x6e, 0x8d, 0x4f, 0x6c, 0xef, 0x98, 0x45, 0xf2, 0x60, 0xa4, 0x05, 0x36, 0x38, 0x6b, 0x4f, 0x70, 0xb4, 0xbf, 0x5f, 0x81, 0xf2, 0x37, 0x73, 0x16, 0x9e, 0x65, 0x04, 0xfa, 0xe0, 0xba, 0x02, 0xc9, 0x17, 0x17, 0x2e, 0x4b, 0xca, 0x6f, 0x2f, 0x26, 0x65, 0x22, 0x53, 0x84, 0xc8, 0x95, 0x22, 0x0b, 0x7c, 0x9a, 0x09, 0x63, 0xeb, 0x57, 0xd8, 0xda, 0x79, 0x70, 0x7b, 0x08, 0x95, 0x89, 0x3b, 0x8d, 0x51, 0x75, 0x8b, 0xd5, 0x08, 0xee, 0xa5, 0xf3, 0x08, 0xd9, 0x54, 0xc2, 0xc8, 0xbb, 0xb0, 0x22, 0x2a, 0x59, 0xeb, 0x07, 0xce, 0xc6, 0x82, 0x95, 0xf7, 0xa6, 0x48, 0x13, 0xbb, 0xff, 0x18, 0xca, 0x7e, 0xc8, 0x37, 0x5f, 0xc7, 0x25, 0xef, 0x5c, 0x58, 0x72, 0xc8, 0xb9, 0x54, 0x80, 0xc8, 0x87, 0x50, 0x3a, 0x71, 0xbd, 0x18, 0xb3, 0x46, 0x73, 0xfb, 0xf6, 0x05, 0xf0, 0x63, 0xd7, 0x8b, 0x29, 0x42, 0x78, 0x98, 0x1f, 0xfb, 0x73, 0x2f, 0x6e, 0xdd, 0xc5, 0x0c, 0x23, 0x06, 0xe4, 0x1e, 0x54, 0xfc, 0xc9, 0x24, 0x62, 0x31, 0x76, 0x96, 0xe5, 0x9d, 0xc2, 0xa7, 0x54, 0x12, 0xf8, 0x84, 0xa9, 0x3b, 0x73, 0x63, 0xec, 0x43, 0xca, 0x54, 0x0c, 0xc8, 0x2e, 0xac, 0x8d, 0xfd, 0x59, 0xe0, 0x4e, 0x99, 0x63, 0x8d, 0xe7, 0x61, 0xe4, 0x87, 0xad, 0x77, 0x2e, 0x1c, 0xd3, 0x9e, 0x44, 0xec, 0x21, 0x80, 0x36, 0xc7, 0xb9, 0x31, 0x31, 0x60, 0x83, 0x79, 0x8e, 0xb5, 0xb8, 0xce, 0xfd, 0xd7, 0xad, 0xb3, 0xce, 0x3c, 0x27, 0x4f, 0x4a, 0xc4, 0xc1, 0x48, 0x68, 0x61, 0xcc, 0x68, 0x6d, 0x60, 0x90, 0xb9, 0x77, 0x69, 0xac, 0x14, 0xe2, 0x64, 0xc2, 0xf7, 0x6f, 0xc0, 0x2d, 0x19, 0x22, 0xad, 0x80, 0x85, 0x13, 0x36, 0x8e, 0xad, 0x60, 0x6a, 0x7b, 0x58, 0xca, 0xa5, 0xc6, 0x4a, 0x24, 0xe4, 0x50, 0x20, 0x0e, 0xa7, 0xb6, 0x47, 0x34, 0xa8, 0x3f, 0x67, 0x67, 0x91, 0xc5, 0x23, 0x29, 0x76, 0xae, 0x29, 0xba, 0xc6, 0xe9, 0x43, 0x6f, 0x7a, 0x46, 0x7e, 0x02, 0x8d, 0xf8, 0xdc, 0xdb, 0xb0, 0x61, 0x6d, 0xe4, 0x4e, 0x35, 0xe3, 0x8b, 0x34, 0x0b, 0x25, 0xf7, 0xa1, 0x2a, 0x35, 0xd4, 0xba, 0x97, 0x5d, 0x3b, 0xa1, 0xf2, 0xc4, 0x3c, 0xb1, 0xdd, 0xa9, 0x7f, 0xca, 0x42, 0x6b, 0x16, 0xb5, 0xda, 0xe2, 0xb6, 0x24, 0x21, 0x1d, 0x44, 0xdc, 0x4f, 0xa3, 0x38, 0xf4, 0xbd, 0xe3, 0xd6, 0x26, 0xde, 0x93, 0xc8, 0xd1, 0xc5, 0xe0, 0xf7, 0x2e, 0x66, 0xfe, 0x7c, 0xf0, 0xfb, 0x1c, 0xee, 0x60, 0x65, 0x66, 0x3d, 0x3b, 0xb3, 0xf2, 0x68, 0x0d, 0xd1, 0x1b, 0xc8, 0xdd, 0x3d, 0x3b, 0xcc, 0x4e, 0x6a, 0x43, 0xcd, 0x71, 0xa3, 0xd8, 0xf5, 0xc6, 0x71, 0xab, 0x85, 0xef, 0x4c, 0xc7, 0xe4, 0x33, 0xb8, 0x3d, 0x73, 0x3d, 0x2b, 0xb2, 0x27, 0xcc, 0x8a, 0x5d, 0xee, 0x9b, 0x6c, 0xec, 0x7b, 0x4e, 0xd4, 0x7a, 0x80, 0x82, 0x93, 0x99, 0xeb, 0x8d, 0xec, 0x09, 0x33, 0xdd, 0x19, 0x1b, 0x09, 0x0e, 0xf9, 0x08, 0xd6, 0x11, 0x1e, 0xb2, 0x60, 0xea, 0x8e, 0x6d, 0xf1, 0xfa, 0x1f, 0xe1, 0xeb, 0xd7, 0x38, 0x83, 0x0a, 0x3a, 0xbe, 0xfa, 0x63, 0x68, 0x06, 0x2c, 0x8c, 0xdc, 0x28, 0xb6, 0xa4, 0x45, 0xbf, 0x97, 0xd5, 0xda, 0xaa, 0x64, 0x0e, 0x91, 0xd7, 0xfe, 0xcf, 0x02, 0x54, 0x84, 0x73, 0x92, 0x4f, 0x41, 0xf1, 0x03, 0xbc, 0x06, 0x69, 0x6e, 0x6f, 0x5e, 0xe2, 0xc1, 0x9d, 0x61, 0xc0, 0xeb, 0x5e, 0x3f, 0xa4, 0x8a, 0x1f, 0xdc, 0xb8, 0x28, 0xd4, 0xfe, 0x10, 0x6a, 0xc9, 0x02, 0xbc, 0xbc, 0xe8, 0xeb, 0xa3, 0x91, 0x65, 0x3e, 0xee, 0x0e, 0xd4, 0x02, 0xb9, 0x03, 0x24, 0x1d, 0x5a, 0x43, 0x6a, 0xe9, 0xdf, 0x1c, 0x75, 0xfb, 0xaa, 0x82, 0x5d, 0x1a, 0xd5, 0xbb, 0xa6, 0x4e, 0x05, 0xb2, 0x48, 0xee, 0xc1, 0xed, 0x2c, 0xe5, 0x1c, 0x5c, 0xc2, 0x14, 0x8c, 0x8f, 0x65, 0x52, 0x01, 0xc5, 0x18, 0xa8, 0x15, 0x9e, 0x16, 0xf4, 0xef, 0x8d, 0x91, 0x39, 0x52, 0xab, 0xed, 0xbf, 0x29, 0x40, 0x19, 0xc3, 0x06, 0x3f, 0x9f, 0x54, 0x72, 0x71, 0x5d, 0x73, 0x5e, 0xb9, 0x1a, 0xd9, 0x92, 0xaa, 0x81, 0x01, 0x65, 0x73, 0x79, 0xf4, 0xf9, 0xb5, 0xd6, 0x53, 0x3f, 0x85, 0x12, 0x8f, 0x52, 0xbc, 0x43, 0x1c, 0xd2, 0x9e, 0x4e, 0xad, 0x47, 0x06, 0x1d, 0xf1, 0x2a, 0x97, 0x40, 0xb3, 0x3b, 0xd8, 0xd3, 0x47, 0xe6, 0x30, 0xa1, 0xa1, 0x56, 0x1e, 0x19, 0x7d, 0x33, 0x45, 0x15, 0xb5, 0x9f, 0xd7, 0x60, 0x35, 0x89, 0x09, 0x22, 0x82, 0x3e, 0x82, 0x46, 0x10, 0xba, 0x33, 0x3b, 0x3c, 0x8b, 0xc6, 0xb6, 0x87, 0x49, 0x01, 0xb6, 0x7f, 0xb4, 0x24, 0xaa, 0x88, 0x1d, 0x1d, 0x0a, 0xec, 0x68, 0x6c, 0x7b, 0x34, 0x3b, 0x91, 0xf4, 0x61, 0x75, 0xc6, 0xc2, 0x63, 0xf6, 0x7b, 0xbe, 0xeb, 0xe1, 0x4a, 0x55, 0x8c, 0xc8, 0xef, 0x5f, 0xba, 0xd2, 0x01, 0x47, 0xff, 0x8e, 0xef, 0x7a, 0xb8, 0x56, 0x7e, 0x32, 0xf9, 0x04, 0xea, 0xa2, 0x12, 0x72, 0xd8, 0x04, 0x63, 0xc5, 0xb2, 0xda, 0x4f, 0xd4, 0xe8, 0x3d, 0x36, 0xc9, 0xc4, 0x65, 0xb8, 0x34, 0x2e, 0x37, 0xb2, 0x71, 0xf9, 0xcd, 0x6c, 0x2c, 0x5a, 0x11, 0x55, 0x78, 0x1a, 0x84, 0x2e, 0x38, 0x7c, 0x6b, 0x89, 0xc3, 0x77, 0x60, 0x23, 0xf1, 0x55, 0xcb, 0xf5, 0x26, 0xee, 0x4b, 0x2b, 0x72, 0x5f, 0x89, 0xd8, 0x53, 0xa6, 0xeb, 0x09, 0xcb, 0xe0, 0x9c, 0x91, 0xfb, 0x8a, 0x11, 0x23, 0xe9, 0xe0, 0x64, 0x0e, 0x5c, 0xc5, 0xab, 0xc9, 0xf7, 0x2e, 0x55, 0x8f, 0x68, 0xbe, 0x64, 0x46, 0xcc, 0x4d, 0x6d, 0xff, 0x52, 0x81, 0x46, 0xe6, 0x1c, 0x78, 0xf6, 0x16, 0xca, 0x42, 0x61, 0xc5, 0x55, 0x94, 0x50, 0x1f, 0x4a, 0xfa, 0x26, 0xd4, 0xa3, 0xd8, 0x0e, 0x63, 0x8b, 0x17, 0x57, 0xb2, 0xdd, 0x45, 0xc2, 0x13, 0x76, 0x46, 0x3e, 0x80, 0x35, 0xc1, 0x74, 0xbd, 0xf1, 0x74, 0x1e, 0xb9, 0xa7, 0xa2, 0x99, 0xaf, 0xd1, 0x26, 0x92, 0x8d, 0x84, 0x4a, 0xee, 0x42, 0x95, 0x67, 0x21, 0xbe, 0x86, 0x68, 0xfa, 0x2a, 0xcc, 0x73, 0xf8, 0x0a, 0x0f, 0x60, 0x95, 0x33, 0xce, 0xe7, 0x57, 0xc4, 0x2d, 0x33, 0xf3, 0x9c, 0xf3, 0xd9, 0x1d, 0xd8, 0x10, 0xaf, 0x09, 0x44, 0xf1, 0x2a, 0x2b, 0xdc, 0x3b, 0xa8, 0xd8, 0x75, 0x64, 0xc9, 0xb2, 0x56, 0x14, 0x9c, 0x1f, 0x01, 0xcf, 0x5e, 0x0b, 0xe8, 0xbb, 0x22, 0x94, 0x31, 0xcf, 0xc9, 0x61, 0x77, 0xe1, 0x1d, 0x8e, 0x9d, 0x7b, 0x76, 0x10, 0x4c, 0x5d, 0xe6, 0x58, 0x53, 0xff, 0x18, 0x43, 0x66, 0x14, 0xdb, 0xb3, 0xc0, 0x9a, 0x47, 0xad, 0x0d, 0x0c, 0x99, 0x6d, 0xe6, 0x39, 0x47, 0x09, 0xa8, 0xef, 0x1f, 0x9b, 0x09, 0xe4, 0x28, 0x6a, 0xff, 0x3e, 0xac, 0xe6, 0xec, 0x71, 0x41, 0xa7, 0x35, 0x74, 0xfe, 0x8c, 0x4e, 0xdf, 0x85, 0x95, 0x20, 0x64, 0xe7, 0xa2, 0xd5, 0x51, 0xb4, 0x86, 0xa0, 0x09, 0xb1, 0xb6, 0x60, 0x05, 0x79, 0x96, 0x20, 0xe6, 0xf3, 0x63, 0x03, 0x59, 0x87, 0xc8, 0x69, 0xbf, 0x80, 0x95, 0xec, 0x69, 0x93, 0x77, 0x33, 0x69, 0xa1, 0x99, 0xcb, 0x93, 0x69, 0x76, 0x48, 0x2a, 0xb2, 0xf5, 0x4b, 0x2a, 0x32, 0x72, 0x9d, 0x8a, 0x4c, 0xfb, 0x2f, 0xd9, 0x9c, 0x65, 0x2a, 0x84, 0x9f, 0x41, 0x2d, 0x90, 0xf5, 0x38, 0x5a, 0x52, 0xfe, 0x12, 0x3e, 0x0f, 0xee, 0x24, 0x95, 0x3b, 0x4d, 0xe7, 0xb4, 0xff, 0x56, 0x81, 0x5a, 0x5a, 0xd0, 0xe7, 0x2c, 0xef, 0xcd, 0x05, 0xcb, 0x3b, 0x90, 0x1a, 0x16, 0x0a, 0x7c, 0x1b, 0xa3, 0xc5, 0x27, 0xaf, 0x7f, 0xd7, 0xc5, 0xb6, 0xe7, 0x34, 0xdb, 0xf6, 0x6c, 0xbe, 0xae, 0xed, 0xf9, 0xe4, 0xa2, 0xc1, 0xbf, 0x95, 0xe9, 0x2d, 0x16, 0xcc, 0xbe, 0xfd, 0x7d, 0xae, 0x0f, 0xca, 0x26, 0x84, 0x77, 0xc4, 0x7e, 0xd2, 0x84, 0x90, 0xb6, 0x3f, 0xf7, 0xaf, 0xd7, 0xfe, 0x6c, 0x43, 0x45, 0xea, 0xfc, 0x0e, 0x54, 0x64, 0x4d, 0x27, 0x1b, 0x04, 0x31, 0x3a, 0x6f, 0x10, 0x0a, 0xb2, 0x4e, 0xd7, 0x7e, 0xae, 0x40, 0x59, 0x0f, 0x43, 0x3f, 0xd4, 0xfe, 0x48, 0x81, 0x3a, 0x3e, 0xed, 0xf9, 0x0e, 0xe3, 0xd9, 0x60, 0xb7, 0xdb, 0xb3, 0xa8, 0xfe, 0xcd, 0x91, 0x8e, 0xd9, 0xa0, 0x0d, 0x77, 0xf6, 0x86, 0x83, 0xbd, 0x23, 0x4a, 0xf5, 0x81, 0x69, 0x99, 0xb4, 0x3b, 0x18, 0xf1, 0xb6, 0x67, 0x38, 0x50, 0x15, 0x9e, 0x29, 0x8c, 0x81, 0xa9, 0xd3, 0x41, 0xb7, 0x6f, 0x89, 0x56, 0xb4, 0x88, 0x77, 0xb3, 0xba, 0xde, 0xb3, 0xf0, 0xd6, 0x51, 0x2d, 0xf1, 0x96, 0xd5, 0x34, 0x0e, 0xf4, 0xe1, 0x91, 0xa9, 0x96, 0xc9, 0x6d, 0x58, 0x3f, 0xd4, 0xe9, 0x81, 0x31, 0x1a, 0x19, 0xc3, 0x81, 0xd5, 0xd3, 0x07, 0x86, 0xde, 0x53, 0x2b, 0x7c, 0x9d, 0x5d, 0x63, 0xdf, 0xec, 0xee, 0xf6, 0x75, 0xb9, 0x4e, 0x95, 0x6c, 0xc2, 0x5b, 0x7b, 0xc3, 0x83, 0x03, 0xc3, 0x34, 0xf5, 0x9e, 0xb5, 0x7b, 0x64, 0x5a, 0x23, 0xd3, 0xe8, 0xf7, 0xad, 0xee, 0xe1, 0x61, 0xff, 0x29, 0x4f, 0x60, 0x35, 0x72, 0x17, 0x36, 0xf6, 0xba, 0x87, 0xdd, 0x5d, 0xa3, 0x6f, 0x98, 0x4f, 0xad, 0x9e, 0x31, 0xe2, 0xf3, 0x7b, 0x6a, 0x9d, 0x27, 0x6c, 0x93, 0x3e, 0xb5, 0xba, 0x7d, 0x14, 0xcd, 0xd4, 0xad, 0xdd, 0xee, 0xde, 0x13, 0x7d, 0xd0, 0x53, 0x81, 0x0b, 0x30, 0xea, 0x3e, 0xd2, 0x2d, 0x2e, 0x92, 0x65, 0x0e, 0x87, 0xd6, 0xb0, 0xdf, 0x53, 0x1b, 0xda, 0xbf, 0x14, 0xa1, 0xb4, 0xe7, 0x47, 0x31, 0xf7, 0x46, 0xe1, 0xac, 0x2f, 0x42, 0x37, 0x66, 0xa2, 0x7f, 0x2b, 0x53, 0xd1, 0x4b, 0x7f, 0x87, 0x24, 0x1e, 0x50, 0x32, 0x10, 0xeb, 0xd9, 0x19, 0xc7, 0x29, 0x88, 0x5b, 0x3b, 0xc7, 0xed, 0x72, 0xb2, 0x88, 0x68, 0x78, 0x85, 0x23, 0xd7, 0x2b, 0x22, 0x4e, 0x06, 0x61, 0xb9, 0xe0, 0xc7, 0x40, 0xb2, 0x20, 0xb9, 0x62, 0x09, 0x91, 0x6a, 0x06, 0x29, 0x96, 0xdc, 0x01, 0x18, 0xfb, 0xb3, 0x99, 0x1b, 0x8f, 0xfd, 0x28, 0x96, 0x5f, 0xc8, 0xda, 0x39, 0x63, 0x8f, 0x62, 0x6e, 0xf1, 0x33, 0x37, 0xe6, 0x8f, 0x34, 0x83, 0x26, 0x3b, 0x70, 0xcf, 0x0e, 0x82, 0xd0, 0x7f, 0xe9, 0xce, 0xec, 0x98, 0x59, 0xdc, 0x73, 0xed, 0x63, 0x66, 0x39, 0x6c, 0x1a, 0xdb, 0xd8, 0x13, 0x95, 0xe9, 0xdd, 0x0c, 0x60, 0x24, 0xf8, 0x3d, 0xce, 0xe6, 0x71, 0xd7, 0x75, 0xac, 0x88, 0xfd, 0x30, 0xe7, 0x1e, 0x60, 0xcd, 0x03, 0xc7, 0xe6, 0x62, 0xd6, 0x45, 0x96, 0x72, 0x9d, 0x91, 0xe4, 0x1c, 0x09, 0x46, 0xfb, 0x15, 0xc0, 0xb9, 0x14, 0x64, 0x1b, 0x6e, 0xf3, 0x3a, 0x9e, 0x45, 0x31, 0x73, 0x2c, 0xb9, 0xdb, 0x60, 0x1e, 0x47, 0x18, 0xe2, 0xcb, 0x74, 0x23, 0x65, 0xca, 0x9b, 0xc2, 0x79, 0x1c, 0x91, 0x9f, 0x40, 0xeb, 0xc2, 0x1c, 0x87, 0x4d, 0x19, 0x7f, 0x6d, 0x15, 0xa7, 0xdd, 0x59, 0x98, 0xd6, 0x13, 0x5c, 0xed, 0x4f, 0x14, 0x80, 0x7d, 0x16, 0x53, 0xc1, 0xcd, 0x34, 0xb6, 0x95, 0xeb, 0x36, 0xb6, 0xef, 0x27, 0x17, 0x08, 0xc5, 0xab, 0x63, 0xc0, 0x42, 0x97, 0xa1, 0xdc, 0xa4, 0xcb, 0xc8, 0x35, 0x11, 0xc5, 0x2b, 0x9a, 0x88, 0x52, 0xae, 0x89, 0xf8, 0x18, 0x9a, 0xf6, 0x74, 0xea, 0xbf, 0xe0, 0x05, 0x0d, 0x0b, 0x43, 0xe6, 0xa0, 0x11, 0x9c, 0xd7, 0xdb, 0xc8, 0xec, 0x49, 0x9e, 0xf6, 0xe7, 0x0a, 0x34, 0x50, 0x15, 0x51, 0xe0, 0x7b, 0x11, 0x23, 0x5f, 0x42, 0x45, 0x5e, 0x44, 0x8b, 0x8b, 0xfc, 0xb7, 0x33, 0xb2, 0x66, 0x70, 0xb2, 0x68, 0xa0, 0x12, 0xcc, 0x33, 0x42, 0xe6, 0x75, 0x97, 0x2b, 0x25, 0x45, 0x91, 0xfb, 0x50, 0x73, 0x3d, 0x4b, 0xb4, 0xd4, 0x95, 0x4c, 0x58, 0xac, 0xba, 0x1e, 0xd6, 0xb2, 0xed, 0x57, 0x50, 0x11, 0x2f, 0x21, 0x9d, 0x54, 0xa6, 0x8b, 0xfa, 0xcb, 0xdc, 0x1c, 0xa7, 0xc2, 0xc8, 0xc3, 0x29, 0xbd, 0x2e, 0x40, 0xb7, 0xa0, 0x7a, 0xca, 0x9b, 0x0f, 0xbc, 0xf4, 0xe3, 0xea, 0x4d, 0x86, 0xda, 0x1f, 0x97, 0x00, 0x0e, 0xe7, 0x4b, 0x0c, 0xa4, 0x71, 0x5d, 0x03, 0xe9, 0xe4, 0xf4, 0xf8, 0x7a, 0x99, 0x7f, 0x75, 0x43, 0x59, 0xd2, 0x69, 0x17, 0x6f, 0xda, 0x69, 0xdf, 0x87, 0x6a, 0x1c, 0xce, 0xb9, 0xa3, 0x08, 0x63, 0x4a, 0x5b, 0x5a, 0x49, 0x25, 0x6f, 0x42, 0x79, 0xe2, 0x87, 0x63, 0x86, 0x8e, 0x95, 0xb2, 0x05, 0xed, 0xc2, 0x65, 0x52, 0xed, 0xb2, 0xcb, 0x24, 0xde, 0xa0, 0x45, 0xf2, 0x1e, 0x0d, 0x0b, 0x99, 0x7c, 0x83, 0x96, 0x5c, 0xb1, 0xd1, 0x14, 0x44, 0xbe, 0x81, 0xa6, 0x3d, 0x8f, 0x7d, 0xcb, 0xe5, 0x15, 0xda, 0xd4, 0x1d, 0x9f, 0x61, 0xd9, 0xdd, 0xcc, 0x7f, 0xaf, 0x4f, 0x0f, 0xaa, 0xd3, 0x9d, 0xc7, 0xbe, 0xe1, 0x1c, 0x22, 0x72, 0xa7, 0x2a, 0x93, 0x12, 0x5d, 0xb1, 0x33, 0x64, 0xed, 0xc7, 0xb0, 0x92, 0x85, 0xf1, 0x04, 0x24, 0x81, 0xea, 0x1b, 0x3c, 0x3b, 0x8d, 0x78, 0x6a, 0x1b, 0x98, 0x46, 0xb7, 0xaf, 0x16, 0xb4, 0x18, 0x1a, 0xb8, 0xbc, 0xf4, 0x8e, 0xeb, 0xba, 0xfd, 0x03, 0x28, 0x61, 0xf8, 0x55, 0x2e, 0x7c, 0x0f, 0xc1, 0x98, 0x8b, 0xcc, 0xbc, 0xf9, 0x15, 0xb3, 0xe6, 0xf7, 0xdf, 0x05, 0x58, 0x31, 0xfd, 0xf9, 0xf8, 0xe4, 0xa2, 0x01, 0xc2, 0xaf, 0x3b, 0x42, 0x2d, 0x31, 0x1f, 0xe5, 0xa6, 0xe6, 0x93, 0x5a, 0x47, 0x71, 0x89, 0x75, 0xdc, 0xf4, 0xcc, 0xb5, 0x2f, 0x60, 0x55, 0x6e, 0x5e, 0x6a, 0x3d, 0xd1, 0x66, 0xe1, 0x0a, 0x6d, 0x6a, 0xbf, 0x50, 0x60, 0x55, 0xc4, 0xf7, 0xff, 0xbb, 0xd2, 0x2a, 0x37, 0x0c, 0xeb, 0xe5, 0x1b, 0x5d, 0x1e, 0xfd, 0xbf, 0xf4, 0x34, 0x6d, 0x08, 0xcd, 0x44, 0x7d, 0x37, 0x50, 0xfb, 0x15, 0x46, 0xfc, 0x8b, 0x02, 0x34, 0x06, 0xec, 0xe5, 0x92, 0x20, 0x5a, 0xbe, 0xee, 0x71, 0x7c, 0x98, 0x2b, 0x57, 0x1b, 0xdb, 0xeb, 0x59, 0x19, 0xc4, 0xd5, 0x63, 0x52, 0xc1, 0xa6, 0xb7, 0xa8, 0xca, 0xf2, 0x5b, 0xd4, 0xd2, 0x62, 0xb7, 0x9e, 0xb9, 0xc5, 0x2b, 0x2e, 0xbb, 0xc5, 0xd3, 0xfe, 0xad, 0x08, 0x0d, 0x6c, 0x90, 0x29, 0x8b, 0xe6, 0xd3, 0x38, 0x27, 0x4c, 0xe1, 0x6a, 0x61, 0x3a, 0x50, 0x09, 0x71, 0x92, 0x74, 0xa5, 0x4b, 0x83, 0xbf, 0x40, 0x61, 0x6b, 0xfc, 0xdc, 0x0d, 0x02, 0xe6, 0x58, 0x82, 0x92, 0x14, 0x30, 0x4d, 0x49, 0x16, 0x22, 0x44, 0xbc, 0xfc, 0x9c, 0xf9, 0x21, 0x4b, 0x51, 0x45, 0xbc, 0x4f, 0x68, 0x70, 0x5a, 0x02, 0xc9, 0xdd, 0x37, 0x88, 0xca, 0xe0, 0xfc, 0xbe, 0x21, 0xed, 0x35, 0x91, 0x5b, 0x47, 0xae, 0xe8, 0x35, 0x91, 0xcd, 0xbb, 0xa8, 0x99, 0x3d, 0x9d, 0x5a, 0x7e, 0x10, 0xa1, 0xd3, 0xd4, 0x68, 0x0d, 0x09, 0xc3, 0x20, 0x22, 0x5f, 0x43, 0x7a, 0x5d, 0x2c, 0x6f, 0xc9, 0xc5, 0x39, 0xb6, 0x2e, 0xbb, 0x58, 0xa0, 0xab, 0xe3, 0xdc, 0xfd, 0xcf, 0x92, 0x1b, 0xea, 0xca, 0x4d, 0x6f, 0xa8, 0x1f, 0x42, 0x59, 0xc4, 0xa8, 0xda, 0xeb, 0x62, 0x94, 0xc0, 0x65, 0xed, 0xb3, 0x91, 0xb7, 0xcf, 0x5f, 0x16, 0x80, 0x74, 0xa7, 0x53, 0x7f, 0x6c, 0xc7, 0xcc, 0x70, 0xa2, 0x8b, 0x66, 0x7a, 0xed, 0xcf, 0x2e, 0x9f, 0x41, 0x7d, 0xe6, 0x3b, 0x6c, 0x6a, 0x25, 0xdf, 0x94, 0x2e, 0xad, 0x7e, 0x10, 0xc6, 0x5b, 0x52, 0x02, 0x25, 0xbc, 0xc4, 0x51, 0xb0, 0xee, 0xc0, 0x67, 0xde, 0x84, 0xcd, 0xec, 0x97, 0xb2, 0x14, 0xe1, 0x8f, 0xa4, 0x03, 0xd5, 0x90, 0x45, 0x2c, 0x3c, 0x65, 0x57, 0x16, 0x55, 0x09, 0x48, 0x7b, 0x06, 0x1b, 0xb9, 0x1d, 0x49, 0x47, 0xbe, 0x85, 0x5f, 0x2b, 0xc3, 0x58, 0x7e, 0xb4, 0x12, 0x03, 0xfe, 0x3a, 0xe6, 0x25, 0x9f, 0x41, 0xf9, 0x63, 0xea, 0xf0, 0xc5, 0xab, 0xe2, 0xec, 0x1e, 0xa8, 0x59, 0x4d, 0xbb, 0x63, 0x0c, 0x36, 0xf2, 0x54, 0x0a, 0xd7, 0x3b, 0x15, 0xed, 0xef, 0x0a, 0xb0, 0xde, 0x75, 0x1c, 0xf1, 0x77, 0xc3, 0x25, 0xaa, 0x2f, 0x5e, 0x57, 0xf5, 0x0b, 0x81, 0x58, 0x84, 0x89, 0x6b, 0x05, 0xe2, 0x0f, 0xa1, 0x92, 0xd6, 0x5a, 0xc5, 0x05, 0x77, 0x16, 0x72, 0x51, 0x09, 0xd0, 0x6e, 0x01, 0xc9, 0x0a, 0x2b, 0xb4, 0xaa, 0xfd, 0x69, 0x11, 0xee, 0xee, 0xb2, 0x63, 0xd7, 0xcb, 0xbe, 0xe2, 0x57, 0xdf, 0xc9, 0xc5, 0x4f, 0x65, 0x9f, 0xc1, 0xba, 0x28, 0xe4, 0x93, 0x7f, 0x62, 0x59, 0xec, 0x58, 0x7e, 0x9d, 0x94, 0xb1, 0x6a, 0x0d, 0xf9, 0x07, 0x92, 0xad, 0xe3, 0x7f, 0xc5, 0x1c, 0x3b, 0xb6, 0x9f, 0xd9, 0x11, 0xb3, 0x5c, 0x47, 0xfe, 0x59, 0x06, 0x12, 0x92, 0xe1, 0x90, 0x21, 0x94, 0xb8, 0x0d, 0xa2, 0xeb, 0x36, 0xb7, 0xb7, 0x33, 0x62, 0x5d, 0xb2, 0x95, 0xac, 0x02, 0x0f, 0x7c, 0x87, 0xed, 0x54, 0x8f, 0x06, 0x4f, 0x06, 0xc3, 0xef, 0x06, 0x14, 0x17, 0x22, 0x06, 0xdc, 0x0a, 0x42, 0x76, 0xea, 0xfa, 0xf3, 0xc8, 0xca, 0x9e, 0x44, 0xf5, 0xca, 0x94, 0xb8, 0x91, 0xcc, 0xc9, 0x10, 0xb5, 0x9f, 0xc2, 0xda, 0xc2, 0xcb, 0x78, 0x6d, 0x26, 0x5f, 0xa7, 0xbe, 0x41, 0x56, 0xa1, 0x8e, 0x1f, 0xbb, 0x97, 0x7f, 0xfb, 0xd6, 0xfe, 0xb5, 0x80, 0x57, 0x4c, 0x33, 0x37, 0xbe, 0x59, 0x06, 0xfb, 0xcd, 0x7c, 0x06, 0x83, 0xed, 0x77, 0xf3, 0xe6, 0x9b, 0x59, 0xb0, 0xf3, 0xad, 0x00, 0xa6, 0x41, 0xa4, 0x6d, 0x43, 0x55, 0xd2, 0xc8, 0x6f, 0xc1, 0x5a, 0xe8, 0xfb, 0x71, 0xd2, 0x89, 0x8a, 0x0e, 0xe4, 0xf2, 0x3f, 0xdb, 0xac, 0x72, 0xb0, 0x48, 0x06, 0x4f, 0xf2, 0xbd, 0x48, 0x59, 0xfc, 0x0d, 0x44, 0x0e, 0x77, 0x1b, 0xbf, 0x5b, 0x4f, 0xff, 0xb7, 0xfb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x35, 0x9f, 0x30, 0x98, 0xf2, 0x2b, 0x00, 0x00, }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/log/log_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/log/log_service.proto package log import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type LogServiceError_ErrorCode int32 const ( LogServiceError_OK LogServiceError_ErrorCode = 0 LogServiceError_INVALID_REQUEST LogServiceError_ErrorCode = 1 LogServiceError_STORAGE_ERROR LogServiceError_ErrorCode = 2 ) var LogServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "INVALID_REQUEST", 2: "STORAGE_ERROR", } var LogServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "INVALID_REQUEST": 1, "STORAGE_ERROR": 2, } func (x LogServiceError_ErrorCode) Enum() *LogServiceError_ErrorCode { p := new(LogServiceError_ErrorCode) *p = x return p } func (x LogServiceError_ErrorCode) String() string { return proto.EnumName(LogServiceError_ErrorCode_name, int32(x)) } func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(LogServiceError_ErrorCode_value, data, "LogServiceError_ErrorCode") if err != nil { return err } *x = LogServiceError_ErrorCode(value) return nil } func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{0, 0} } type LogServiceError struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogServiceError) Reset() { *m = LogServiceError{} } func (m *LogServiceError) String() string { return proto.CompactTextString(m) } func (*LogServiceError) ProtoMessage() {} func (*LogServiceError) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{0} } func (m *LogServiceError) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogServiceError.Unmarshal(m, b) } func (m *LogServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogServiceError.Marshal(b, m, deterministic) } func (dst *LogServiceError) XXX_Merge(src proto.Message) { xxx_messageInfo_LogServiceError.Merge(dst, src) } func (m *LogServiceError) XXX_Size() int { return xxx_messageInfo_LogServiceError.Size(m) } func (m *LogServiceError) XXX_DiscardUnknown() { xxx_messageInfo_LogServiceError.DiscardUnknown(m) } var xxx_messageInfo_LogServiceError proto.InternalMessageInfo type UserAppLogLine struct { TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"` Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} } func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) } func (*UserAppLogLine) ProtoMessage() {} func (*UserAppLogLine) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{1} } func (m *UserAppLogLine) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserAppLogLine.Unmarshal(m, b) } func (m *UserAppLogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UserAppLogLine.Marshal(b, m, deterministic) } func (dst *UserAppLogLine) XXX_Merge(src proto.Message) { xxx_messageInfo_UserAppLogLine.Merge(dst, src) } func (m *UserAppLogLine) XXX_Size() int { return xxx_messageInfo_UserAppLogLine.Size(m) } func (m *UserAppLogLine) XXX_DiscardUnknown() { xxx_messageInfo_UserAppLogLine.DiscardUnknown(m) } var xxx_messageInfo_UserAppLogLine proto.InternalMessageInfo func (m *UserAppLogLine) GetTimestampUsec() int64 { if m != nil && m.TimestampUsec != nil { return *m.TimestampUsec } return 0 } func (m *UserAppLogLine) GetLevel() int64 { if m != nil && m.Level != nil { return *m.Level } return 0 } func (m *UserAppLogLine) GetMessage() string { if m != nil && m.Message != nil { return *m.Message } return "" } type UserAppLogGroup struct { LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} } func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) } func (*UserAppLogGroup) ProtoMessage() {} func (*UserAppLogGroup) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{2} } func (m *UserAppLogGroup) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserAppLogGroup.Unmarshal(m, b) } func (m *UserAppLogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UserAppLogGroup.Marshal(b, m, deterministic) } func (dst *UserAppLogGroup) XXX_Merge(src proto.Message) { xxx_messageInfo_UserAppLogGroup.Merge(dst, src) } func (m *UserAppLogGroup) XXX_Size() int { return xxx_messageInfo_UserAppLogGroup.Size(m) } func (m *UserAppLogGroup) XXX_DiscardUnknown() { xxx_messageInfo_UserAppLogGroup.DiscardUnknown(m) } var xxx_messageInfo_UserAppLogGroup proto.InternalMessageInfo func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine { if m != nil { return m.LogLine } return nil } type FlushRequest struct { Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *FlushRequest) Reset() { *m = FlushRequest{} } func (m *FlushRequest) String() string { return proto.CompactTextString(m) } func (*FlushRequest) ProtoMessage() {} func (*FlushRequest) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{3} } func (m *FlushRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FlushRequest.Unmarshal(m, b) } func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic) } func (dst *FlushRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_FlushRequest.Merge(dst, src) } func (m *FlushRequest) XXX_Size() int { return xxx_messageInfo_FlushRequest.Size(m) } func (m *FlushRequest) XXX_DiscardUnknown() { xxx_messageInfo_FlushRequest.DiscardUnknown(m) } var xxx_messageInfo_FlushRequest proto.InternalMessageInfo func (m *FlushRequest) GetLogs() []byte { if m != nil { return m.Logs } return nil } type SetStatusRequest struct { Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} } func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) } func (*SetStatusRequest) ProtoMessage() {} func (*SetStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{4} } func (m *SetStatusRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetStatusRequest.Unmarshal(m, b) } func (m *SetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SetStatusRequest.Marshal(b, m, deterministic) } func (dst *SetStatusRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_SetStatusRequest.Merge(dst, src) } func (m *SetStatusRequest) XXX_Size() int { return xxx_messageInfo_SetStatusRequest.Size(m) } func (m *SetStatusRequest) XXX_DiscardUnknown() { xxx_messageInfo_SetStatusRequest.DiscardUnknown(m) } var xxx_messageInfo_SetStatusRequest proto.InternalMessageInfo func (m *SetStatusRequest) GetStatus() string { if m != nil && m.Status != nil { return *m.Status } return "" } type LogOffset struct { RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogOffset) Reset() { *m = LogOffset{} } func (m *LogOffset) String() string { return proto.CompactTextString(m) } func (*LogOffset) ProtoMessage() {} func (*LogOffset) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{5} } func (m *LogOffset) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogOffset.Unmarshal(m, b) } func (m *LogOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogOffset.Marshal(b, m, deterministic) } func (dst *LogOffset) XXX_Merge(src proto.Message) { xxx_messageInfo_LogOffset.Merge(dst, src) } func (m *LogOffset) XXX_Size() int { return xxx_messageInfo_LogOffset.Size(m) } func (m *LogOffset) XXX_DiscardUnknown() { xxx_messageInfo_LogOffset.DiscardUnknown(m) } var xxx_messageInfo_LogOffset proto.InternalMessageInfo func (m *LogOffset) GetRequestId() []byte { if m != nil { return m.RequestId } return nil } type LogLine struct { Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"` Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogLine) Reset() { *m = LogLine{} } func (m *LogLine) String() string { return proto.CompactTextString(m) } func (*LogLine) ProtoMessage() {} func (*LogLine) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{6} } func (m *LogLine) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogLine.Unmarshal(m, b) } func (m *LogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogLine.Marshal(b, m, deterministic) } func (dst *LogLine) XXX_Merge(src proto.Message) { xxx_messageInfo_LogLine.Merge(dst, src) } func (m *LogLine) XXX_Size() int { return xxx_messageInfo_LogLine.Size(m) } func (m *LogLine) XXX_DiscardUnknown() { xxx_messageInfo_LogLine.DiscardUnknown(m) } var xxx_messageInfo_LogLine proto.InternalMessageInfo func (m *LogLine) GetTime() int64 { if m != nil && m.Time != nil { return *m.Time } return 0 } func (m *LogLine) GetLevel() int32 { if m != nil && m.Level != nil { return *m.Level } return 0 } func (m *LogLine) GetLogMessage() string { if m != nil && m.LogMessage != nil { return *m.LogMessage } return "" } type RequestLog struct { AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` ModuleId *string `protobuf:"bytes,37,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` VersionId *string `protobuf:"bytes,2,req,name=version_id,json=versionId" json:"version_id,omitempty"` RequestId []byte `protobuf:"bytes,3,req,name=request_id,json=requestId" json:"request_id,omitempty"` Offset *LogOffset `protobuf:"bytes,35,opt,name=offset" json:"offset,omitempty"` Ip *string `protobuf:"bytes,4,req,name=ip" json:"ip,omitempty"` Nickname *string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` StartTime *int64 `protobuf:"varint,6,req,name=start_time,json=startTime" json:"start_time,omitempty"` EndTime *int64 `protobuf:"varint,7,req,name=end_time,json=endTime" json:"end_time,omitempty"` Latency *int64 `protobuf:"varint,8,req,name=latency" json:"latency,omitempty"` Mcycles *int64 `protobuf:"varint,9,req,name=mcycles" json:"mcycles,omitempty"` Method *string `protobuf:"bytes,10,req,name=method" json:"method,omitempty"` Resource *string `protobuf:"bytes,11,req,name=resource" json:"resource,omitempty"` HttpVersion *string `protobuf:"bytes,12,req,name=http_version,json=httpVersion" json:"http_version,omitempty"` Status *int32 `protobuf:"varint,13,req,name=status" json:"status,omitempty"` ResponseSize *int64 `protobuf:"varint,14,req,name=response_size,json=responseSize" json:"response_size,omitempty"` Referrer *string `protobuf:"bytes,15,opt,name=referrer" json:"referrer,omitempty"` UserAgent *string `protobuf:"bytes,16,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry,json=urlMapEntry" json:"url_map_entry,omitempty"` Combined *string `protobuf:"bytes,18,req,name=combined" json:"combined,omitempty"` ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles,json=apiMcycles" json:"api_mcycles,omitempty"` Host *string `protobuf:"bytes,20,opt,name=host" json:"host,omitempty"` Cost *float64 `protobuf:"fixed64,21,opt,name=cost" json:"cost,omitempty"` TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name,json=taskQueueName" json:"task_queue_name,omitempty"` TaskName *string `protobuf:"bytes,23,opt,name=task_name,json=taskName" json:"task_name,omitempty"` WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request,json=wasLoadingRequest" json:"was_loading_request,omitempty"` PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time,json=pendingTime" json:"pending_time,omitempty"` ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,json=replicaIndex,def=-1" json:"replica_index,omitempty"` Finished *bool `protobuf:"varint,27,opt,name=finished,def=1" json:"finished,omitempty"` CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key,json=cloneKey" json:"clone_key,omitempty"` Line []*LogLine `protobuf:"bytes,29,rep,name=line" json:"line,omitempty"` LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete,json=linesIncomplete" json:"lines_incomplete,omitempty"` AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release,json=appEngineRelease" json:"app_engine_release,omitempty"` ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason,json=exitReason" json:"exit_reason,omitempty"` WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time,json=wasThrottledForTime" json:"was_throttled_for_time,omitempty"` WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"` ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"` ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *RequestLog) Reset() { *m = RequestLog{} } func (m *RequestLog) String() string { return proto.CompactTextString(m) } func (*RequestLog) ProtoMessage() {} func (*RequestLog) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{7} } func (m *RequestLog) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RequestLog.Unmarshal(m, b) } func (m *RequestLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RequestLog.Marshal(b, m, deterministic) } func (dst *RequestLog) XXX_Merge(src proto.Message) { xxx_messageInfo_RequestLog.Merge(dst, src) } func (m *RequestLog) XXX_Size() int { return xxx_messageInfo_RequestLog.Size(m) } func (m *RequestLog) XXX_DiscardUnknown() { xxx_messageInfo_RequestLog.DiscardUnknown(m) } var xxx_messageInfo_RequestLog proto.InternalMessageInfo const Default_RequestLog_ModuleId string = "default" const Default_RequestLog_ReplicaIndex int32 = -1 const Default_RequestLog_Finished bool = true func (m *RequestLog) GetAppId() string { if m != nil && m.AppId != nil { return *m.AppId } return "" } func (m *RequestLog) GetModuleId() string { if m != nil && m.ModuleId != nil { return *m.ModuleId } return Default_RequestLog_ModuleId } func (m *RequestLog) GetVersionId() string { if m != nil && m.VersionId != nil { return *m.VersionId } return "" } func (m *RequestLog) GetRequestId() []byte { if m != nil { return m.RequestId } return nil } func (m *RequestLog) GetOffset() *LogOffset { if m != nil { return m.Offset } return nil } func (m *RequestLog) GetIp() string { if m != nil && m.Ip != nil { return *m.Ip } return "" } func (m *RequestLog) GetNickname() string { if m != nil && m.Nickname != nil { return *m.Nickname } return "" } func (m *RequestLog) GetStartTime() int64 { if m != nil && m.StartTime != nil { return *m.StartTime } return 0 } func (m *RequestLog) GetEndTime() int64 { if m != nil && m.EndTime != nil { return *m.EndTime } return 0 } func (m *RequestLog) GetLatency() int64 { if m != nil && m.Latency != nil { return *m.Latency } return 0 } func (m *RequestLog) GetMcycles() int64 { if m != nil && m.Mcycles != nil { return *m.Mcycles } return 0 } func (m *RequestLog) GetMethod() string { if m != nil && m.Method != nil { return *m.Method } return "" } func (m *RequestLog) GetResource() string { if m != nil && m.Resource != nil { return *m.Resource } return "" } func (m *RequestLog) GetHttpVersion() string { if m != nil && m.HttpVersion != nil { return *m.HttpVersion } return "" } func (m *RequestLog) GetStatus() int32 { if m != nil && m.Status != nil { return *m.Status } return 0 } func (m *RequestLog) GetResponseSize() int64 { if m != nil && m.ResponseSize != nil { return *m.ResponseSize } return 0 } func (m *RequestLog) GetReferrer() string { if m != nil && m.Referrer != nil { return *m.Referrer } return "" } func (m *RequestLog) GetUserAgent() string { if m != nil && m.UserAgent != nil { return *m.UserAgent } return "" } func (m *RequestLog) GetUrlMapEntry() string { if m != nil && m.UrlMapEntry != nil { return *m.UrlMapEntry } return "" } func (m *RequestLog) GetCombined() string { if m != nil && m.Combined != nil { return *m.Combined } return "" } func (m *RequestLog) GetApiMcycles() int64 { if m != nil && m.ApiMcycles != nil { return *m.ApiMcycles } return 0 } func (m *RequestLog) GetHost() string { if m != nil && m.Host != nil { return *m.Host } return "" } func (m *RequestLog) GetCost() float64 { if m != nil && m.Cost != nil { return *m.Cost } return 0 } func (m *RequestLog) GetTaskQueueName() string { if m != nil && m.TaskQueueName != nil { return *m.TaskQueueName } return "" } func (m *RequestLog) GetTaskName() string { if m != nil && m.TaskName != nil { return *m.TaskName } return "" } func (m *RequestLog) GetWasLoadingRequest() bool { if m != nil && m.WasLoadingRequest != nil { return *m.WasLoadingRequest } return false } func (m *RequestLog) GetPendingTime() int64 { if m != nil && m.PendingTime != nil { return *m.PendingTime } return 0 } func (m *RequestLog) GetReplicaIndex() int32 { if m != nil && m.ReplicaIndex != nil { return *m.ReplicaIndex } return Default_RequestLog_ReplicaIndex } func (m *RequestLog) GetFinished() bool { if m != nil && m.Finished != nil { return *m.Finished } return Default_RequestLog_Finished } func (m *RequestLog) GetCloneKey() []byte { if m != nil { return m.CloneKey } return nil } func (m *RequestLog) GetLine() []*LogLine { if m != nil { return m.Line } return nil } func (m *RequestLog) GetLinesIncomplete() bool { if m != nil && m.LinesIncomplete != nil { return *m.LinesIncomplete } return false } func (m *RequestLog) GetAppEngineRelease() []byte { if m != nil { return m.AppEngineRelease } return nil } func (m *RequestLog) GetExitReason() int32 { if m != nil && m.ExitReason != nil { return *m.ExitReason } return 0 } func (m *RequestLog) GetWasThrottledForTime() bool { if m != nil && m.WasThrottledForTime != nil { return *m.WasThrottledForTime } return false } func (m *RequestLog) GetWasThrottledForRequests() bool { if m != nil && m.WasThrottledForRequests != nil { return *m.WasThrottledForRequests } return false } func (m *RequestLog) GetThrottledTime() int64 { if m != nil && m.ThrottledTime != nil { return *m.ThrottledTime } return 0 } func (m *RequestLog) GetServerName() []byte { if m != nil { return m.ServerName } return nil } type LogModuleVersion struct { ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} } func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) } func (*LogModuleVersion) ProtoMessage() {} func (*LogModuleVersion) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{8} } func (m *LogModuleVersion) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogModuleVersion.Unmarshal(m, b) } func (m *LogModuleVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogModuleVersion.Marshal(b, m, deterministic) } func (dst *LogModuleVersion) XXX_Merge(src proto.Message) { xxx_messageInfo_LogModuleVersion.Merge(dst, src) } func (m *LogModuleVersion) XXX_Size() int { return xxx_messageInfo_LogModuleVersion.Size(m) } func (m *LogModuleVersion) XXX_DiscardUnknown() { xxx_messageInfo_LogModuleVersion.DiscardUnknown(m) } var xxx_messageInfo_LogModuleVersion proto.InternalMessageInfo const Default_LogModuleVersion_ModuleId string = "default" func (m *LogModuleVersion) GetModuleId() string { if m != nil && m.ModuleId != nil { return *m.ModuleId } return Default_LogModuleVersion_ModuleId } func (m *LogModuleVersion) GetVersionId() string { if m != nil && m.VersionId != nil { return *m.VersionId } return "" } type LogReadRequest struct { AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"` StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"` RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"` MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"` IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"` Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"` CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"` HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"` ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"` IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"` AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"` IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"` IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"` CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"` NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogReadRequest) Reset() { *m = LogReadRequest{} } func (m *LogReadRequest) String() string { return proto.CompactTextString(m) } func (*LogReadRequest) ProtoMessage() {} func (*LogReadRequest) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{9} } func (m *LogReadRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogReadRequest.Unmarshal(m, b) } func (m *LogReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogReadRequest.Marshal(b, m, deterministic) } func (dst *LogReadRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_LogReadRequest.Merge(dst, src) } func (m *LogReadRequest) XXX_Size() int { return xxx_messageInfo_LogReadRequest.Size(m) } func (m *LogReadRequest) XXX_DiscardUnknown() { xxx_messageInfo_LogReadRequest.DiscardUnknown(m) } var xxx_messageInfo_LogReadRequest proto.InternalMessageInfo func (m *LogReadRequest) GetAppId() string { if m != nil && m.AppId != nil { return *m.AppId } return "" } func (m *LogReadRequest) GetVersionId() []string { if m != nil { return m.VersionId } return nil } func (m *LogReadRequest) GetModuleVersion() []*LogModuleVersion { if m != nil { return m.ModuleVersion } return nil } func (m *LogReadRequest) GetStartTime() int64 { if m != nil && m.StartTime != nil { return *m.StartTime } return 0 } func (m *LogReadRequest) GetEndTime() int64 { if m != nil && m.EndTime != nil { return *m.EndTime } return 0 } func (m *LogReadRequest) GetOffset() *LogOffset { if m != nil { return m.Offset } return nil } func (m *LogReadRequest) GetRequestId() [][]byte { if m != nil { return m.RequestId } return nil } func (m *LogReadRequest) GetMinimumLogLevel() int32 { if m != nil && m.MinimumLogLevel != nil { return *m.MinimumLogLevel } return 0 } func (m *LogReadRequest) GetIncludeIncomplete() bool { if m != nil && m.IncludeIncomplete != nil { return *m.IncludeIncomplete } return false } func (m *LogReadRequest) GetCount() int64 { if m != nil && m.Count != nil { return *m.Count } return 0 } func (m *LogReadRequest) GetCombinedLogRegex() string { if m != nil && m.CombinedLogRegex != nil { return *m.CombinedLogRegex } return "" } func (m *LogReadRequest) GetHostRegex() string { if m != nil && m.HostRegex != nil { return *m.HostRegex } return "" } func (m *LogReadRequest) GetReplicaIndex() int32 { if m != nil && m.ReplicaIndex != nil { return *m.ReplicaIndex } return 0 } func (m *LogReadRequest) GetIncludeAppLogs() bool { if m != nil && m.IncludeAppLogs != nil { return *m.IncludeAppLogs } return false } func (m *LogReadRequest) GetAppLogsPerRequest() int32 { if m != nil && m.AppLogsPerRequest != nil { return *m.AppLogsPerRequest } return 0 } func (m *LogReadRequest) GetIncludeHost() bool { if m != nil && m.IncludeHost != nil { return *m.IncludeHost } return false } func (m *LogReadRequest) GetIncludeAll() bool { if m != nil && m.IncludeAll != nil { return *m.IncludeAll } return false } func (m *LogReadRequest) GetCacheIterator() bool { if m != nil && m.CacheIterator != nil { return *m.CacheIterator } return false } func (m *LogReadRequest) GetNumShards() int32 { if m != nil && m.NumShards != nil { return *m.NumShards } return 0 } type LogReadResponse struct { Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"` Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogReadResponse) Reset() { *m = LogReadResponse{} } func (m *LogReadResponse) String() string { return proto.CompactTextString(m) } func (*LogReadResponse) ProtoMessage() {} func (*LogReadResponse) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{10} } func (m *LogReadResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogReadResponse.Unmarshal(m, b) } func (m *LogReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogReadResponse.Marshal(b, m, deterministic) } func (dst *LogReadResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_LogReadResponse.Merge(dst, src) } func (m *LogReadResponse) XXX_Size() int { return xxx_messageInfo_LogReadResponse.Size(m) } func (m *LogReadResponse) XXX_DiscardUnknown() { xxx_messageInfo_LogReadResponse.DiscardUnknown(m) } var xxx_messageInfo_LogReadResponse proto.InternalMessageInfo func (m *LogReadResponse) GetLog() []*RequestLog { if m != nil { return m.Log } return nil } func (m *LogReadResponse) GetOffset() *LogOffset { if m != nil { return m.Offset } return nil } func (m *LogReadResponse) GetLastEndTime() int64 { if m != nil && m.LastEndTime != nil { return *m.LastEndTime } return 0 } type LogUsageRecord struct { VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"` StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"` EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"` Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"` TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"` Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} } func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) } func (*LogUsageRecord) ProtoMessage() {} func (*LogUsageRecord) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{11} } func (m *LogUsageRecord) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogUsageRecord.Unmarshal(m, b) } func (m *LogUsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogUsageRecord.Marshal(b, m, deterministic) } func (dst *LogUsageRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_LogUsageRecord.Merge(dst, src) } func (m *LogUsageRecord) XXX_Size() int { return xxx_messageInfo_LogUsageRecord.Size(m) } func (m *LogUsageRecord) XXX_DiscardUnknown() { xxx_messageInfo_LogUsageRecord.DiscardUnknown(m) } var xxx_messageInfo_LogUsageRecord proto.InternalMessageInfo func (m *LogUsageRecord) GetVersionId() string { if m != nil && m.VersionId != nil { return *m.VersionId } return "" } func (m *LogUsageRecord) GetStartTime() int32 { if m != nil && m.StartTime != nil { return *m.StartTime } return 0 } func (m *LogUsageRecord) GetEndTime() int32 { if m != nil && m.EndTime != nil { return *m.EndTime } return 0 } func (m *LogUsageRecord) GetCount() int64 { if m != nil && m.Count != nil { return *m.Count } return 0 } func (m *LogUsageRecord) GetTotalSize() int64 { if m != nil && m.TotalSize != nil { return *m.TotalSize } return 0 } func (m *LogUsageRecord) GetRecords() int32 { if m != nil && m.Records != nil { return *m.Records } return 0 } type LogUsageRequest struct { AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"` CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"` UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"` VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} } func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) } func (*LogUsageRequest) ProtoMessage() {} func (*LogUsageRequest) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{12} } func (m *LogUsageRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogUsageRequest.Unmarshal(m, b) } func (m *LogUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogUsageRequest.Marshal(b, m, deterministic) } func (dst *LogUsageRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_LogUsageRequest.Merge(dst, src) } func (m *LogUsageRequest) XXX_Size() int { return xxx_messageInfo_LogUsageRequest.Size(m) } func (m *LogUsageRequest) XXX_DiscardUnknown() { xxx_messageInfo_LogUsageRequest.DiscardUnknown(m) } var xxx_messageInfo_LogUsageRequest proto.InternalMessageInfo const Default_LogUsageRequest_ResolutionHours uint32 = 1 func (m *LogUsageRequest) GetAppId() string { if m != nil && m.AppId != nil { return *m.AppId } return "" } func (m *LogUsageRequest) GetVersionId() []string { if m != nil { return m.VersionId } return nil } func (m *LogUsageRequest) GetStartTime() int32 { if m != nil && m.StartTime != nil { return *m.StartTime } return 0 } func (m *LogUsageRequest) GetEndTime() int32 { if m != nil && m.EndTime != nil { return *m.EndTime } return 0 } func (m *LogUsageRequest) GetResolutionHours() uint32 { if m != nil && m.ResolutionHours != nil { return *m.ResolutionHours } return Default_LogUsageRequest_ResolutionHours } func (m *LogUsageRequest) GetCombineVersions() bool { if m != nil && m.CombineVersions != nil { return *m.CombineVersions } return false } func (m *LogUsageRequest) GetUsageVersion() int32 { if m != nil && m.UsageVersion != nil { return *m.UsageVersion } return 0 } func (m *LogUsageRequest) GetVersionsOnly() bool { if m != nil && m.VersionsOnly != nil { return *m.VersionsOnly } return false } type LogUsageResponse struct { Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"` Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} } func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) } func (*LogUsageResponse) ProtoMessage() {} func (*LogUsageResponse) Descriptor() ([]byte, []int) { return fileDescriptor_log_service_f054fd4b5012319d, []int{13} } func (m *LogUsageResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogUsageResponse.Unmarshal(m, b) } func (m *LogUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LogUsageResponse.Marshal(b, m, deterministic) } func (dst *LogUsageResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_LogUsageResponse.Merge(dst, src) } func (m *LogUsageResponse) XXX_Size() int { return xxx_messageInfo_LogUsageResponse.Size(m) } func (m *LogUsageResponse) XXX_DiscardUnknown() { xxx_messageInfo_LogUsageResponse.DiscardUnknown(m) } var xxx_messageInfo_LogUsageResponse proto.InternalMessageInfo func (m *LogUsageResponse) GetUsage() []*LogUsageRecord { if m != nil { return m.Usage } return nil } func (m *LogUsageResponse) GetSummary() *LogUsageRecord { if m != nil { return m.Summary } return nil } func init() { proto.RegisterType((*LogServiceError)(nil), "appengine.LogServiceError") proto.RegisterType((*UserAppLogLine)(nil), "appengine.UserAppLogLine") proto.RegisterType((*UserAppLogGroup)(nil), "appengine.UserAppLogGroup") proto.RegisterType((*FlushRequest)(nil), "appengine.FlushRequest") proto.RegisterType((*SetStatusRequest)(nil), "appengine.SetStatusRequest") proto.RegisterType((*LogOffset)(nil), "appengine.LogOffset") proto.RegisterType((*LogLine)(nil), "appengine.LogLine") proto.RegisterType((*RequestLog)(nil), "appengine.RequestLog") proto.RegisterType((*LogModuleVersion)(nil), "appengine.LogModuleVersion") proto.RegisterType((*LogReadRequest)(nil), "appengine.LogReadRequest") proto.RegisterType((*LogReadResponse)(nil), "appengine.LogReadResponse") proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord") proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest") proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse") } func init() { proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor_log_service_f054fd4b5012319d) } var fileDescriptor_log_service_f054fd4b5012319d = []byte{ // 1553 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6, 0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e, 0x1c, 0xd6, 0x93, 0x48, 0x93, 0xa4, 0x57, 0xca, 0x95, 0xd3, 0x2a, 0x8e, 0x26, 0xb4, 0xd5, 0x40, 0x72, 0x3a, 0xd3, 0x1b, 0x0c, 0x0a, 0x1c, 0x81, 0x18, 0x2f, 0xb1, 0xc8, 0xee, 0xc2, 0x91, 0x72, 0xdb, 0xdb, 0x3e, 0x46, 0x1f, 0xa2, 0xaf, 0xd2, 0xb7, 0xe9, 0xec, 0xd9, 0x05, 0x44, 0x2a, 0x4d, 0xc6, 0x33, 0xb9, 0xe0, 0x10, 0xfb, 0x9d, 0x83, 0xdd, 0xf3, 0xf3, 0x9d, 0x6f, 0x01, 0xc7, 0xb9, 0x94, 0xb9, 0xc0, 0xc3, 0x5c, 0x8a, 0xa4, 0xcc, 0x0f, 0xa5, 0xca, 0x8f, 0x92, 0xaa, 0xc2, 0x32, 0x2f, 0x4a, 0x3c, 0x2a, 0x4a, 0x83, 0xaa, 0x4c, 0xc4, 0x91, 0x90, 0xb9, 0xfd, 0xc5, 0x1a, 0xd5, 0xbb, 0x22, 0xc5, 0xc3, 0x4a, 0x49, 0x23, 0xd9, 0xb0, 0xf5, 0x0c, 0x5f, 0xc3, 0x74, 0x29, 0xf3, 0x73, 0x67, 0x3e, 0x51, 0x4a, 0xaa, 0xf0, 0x4b, 0x18, 0xd2, 0xc3, 0x9f, 0x65, 0x86, 0x6c, 0x17, 0x3a, 0x67, 0xdf, 0xce, 0x7e, 0xc7, 0xee, 0xc0, 0xf4, 0xf4, 0xf5, 0xf7, 0x2f, 0x96, 0xa7, 0x7f, 0x89, 0xa3, 0x93, 0xef, 0xde, 0x9c, 0x9c, 0x5f, 0xcc, 0x02, 0xb6, 0x0f, 0x93, 0xf3, 0x8b, 0xb3, 0xe8, 0xc5, 0xcb, 0x93, 0xf8, 0x24, 0x8a, 0xce, 0xa2, 0x59, 0x27, 0xcc, 0x61, 0xef, 0x8d, 0x46, 0xf5, 0xa2, 0xaa, 0x96, 0x32, 0x5f, 0x16, 0x25, 0xb2, 0x8f, 0x60, 0xcf, 0x14, 0x6b, 0xd4, 0x26, 0x59, 0x57, 0x71, 0xad, 0x31, 0xe5, 0xc1, 0xbc, 0xb3, 0xe8, 0x46, 0x93, 0x16, 0x7d, 0xa3, 0x31, 0x65, 0x07, 0xd0, 0x13, 0xf8, 0x0e, 0x05, 0xef, 0x90, 0xd5, 0x2d, 0x18, 0x87, 0xfe, 0x1a, 0xb5, 0x4e, 0x72, 0xe4, 0xdd, 0x79, 0x67, 0x31, 0x8c, 0x9a, 0x65, 0xf8, 0x12, 0xa6, 0x37, 0x07, 0xbd, 0x54, 0xb2, 0xae, 0xd8, 0x9f, 0x60, 0x60, 0x73, 0x15, 0x45, 0x89, 0xbc, 0x33, 0xef, 0x2e, 0x46, 0x9f, 0xdf, 0x3f, 0x6c, 0x33, 0x3d, 0xdc, 0x0e, 0x2b, 0xea, 0x0b, 0xf7, 0x10, 0x86, 0x30, 0xfe, 0x5a, 0xd4, 0x7a, 0x15, 0xe1, 0x0f, 0x35, 0x6a, 0xc3, 0x18, 0xec, 0x08, 0x99, 0x6b, 0x1e, 0xcc, 0x83, 0xc5, 0x38, 0xa2, 0xe7, 0xf0, 0x39, 0xcc, 0xce, 0xd1, 0x9c, 0x9b, 0xc4, 0xd4, 0xba, 0xf1, 0xbb, 0x07, 0xbb, 0x9a, 0x00, 0xca, 0x67, 0x18, 0xf9, 0x55, 0xf8, 0x1c, 0x86, 0x4b, 0x99, 0x9f, 0x5d, 0x5e, 0x6a, 0x34, 0xec, 0x11, 0x80, 0x72, 0xfe, 0x71, 0x91, 0xf9, 0x2d, 0x87, 0x1e, 0x39, 0xcd, 0xc2, 0x0b, 0xe8, 0x37, 0x65, 0x62, 0xb0, 0x63, 0x0b, 0xe2, 0x8b, 0x43, 0xcf, 0xdb, 0x35, 0xe9, 0x35, 0x35, 0x79, 0x0c, 0x23, 0x9b, 0xe6, 0x76, 0x5d, 0x40, 0xc8, 0xfc, 0x95, 0x2f, 0xcd, 0x3f, 0x01, 0xc0, 0x47, 0xb9, 0x94, 0x39, 0xbb, 0x0b, 0xbb, 0x49, 0x55, 0xb9, 0xf3, 0xad, 0x6b, 0x2f, 0xa9, 0xaa, 0xd3, 0x8c, 0x7d, 0x08, 0xc3, 0xb5, 0xcc, 0x6a, 0x81, 0xd6, 0xf2, 0xd1, 0x3c, 0x58, 0x0c, 0x8f, 0xfb, 0x19, 0x5e, 0x26, 0xb5, 0x30, 0xd1, 0xc0, 0x59, 0x4e, 0x33, 0x9b, 0xc0, 0x3b, 0x54, 0xba, 0x90, 0xa5, 0x75, 0xeb, 0xd0, 0x06, 0x43, 0x8f, 0x38, 0xf3, 0x46, 0x7e, 0x36, 0x94, 0xcd, 0xfc, 0xd8, 0x27, 0xb0, 0x2b, 0xa9, 0x10, 0xfc, 0xe9, 0x3c, 0x58, 0x8c, 0x3e, 0x3f, 0xd8, 0xe8, 0x47, 0x5b, 0xa4, 0xc8, 0xfb, 0xb0, 0x3d, 0xe8, 0x14, 0x15, 0xdf, 0xa1, 0x33, 0x3a, 0x45, 0xc5, 0x1e, 0xc0, 0xa0, 0x2c, 0xd2, 0xb7, 0x65, 0xb2, 0x46, 0xde, 0xb3, 0x01, 0x46, 0xed, 0xda, 0x1e, 0xac, 0x4d, 0xa2, 0x4c, 0x4c, 0x45, 0xdb, 0xa5, 0xa2, 0x0d, 0x09, 0xb9, 0xb0, 0x95, 0xbb, 0x0f, 0x03, 0x2c, 0x33, 0x67, 0xec, 0x93, 0xb1, 0x8f, 0x65, 0x46, 0x26, 0x0e, 0x7d, 0x91, 0x18, 0x2c, 0xd3, 0x6b, 0x3e, 0x70, 0x16, 0xbf, 0x24, 0xb2, 0xa5, 0xd7, 0xa9, 0x40, 0xcd, 0x87, 0xce, 0xe2, 0x97, 0xb6, 0xd7, 0x6b, 0x34, 0x2b, 0x99, 0x71, 0x70, 0xbd, 0x76, 0x2b, 0x1b, 0xa1, 0x42, 0x2d, 0x6b, 0x95, 0x22, 0x1f, 0x91, 0xa5, 0x5d, 0xb3, 0x27, 0x30, 0x5e, 0x19, 0x53, 0xc5, 0xbe, 0x58, 0x7c, 0x4c, 0xf6, 0x91, 0xc5, 0xbe, 0x77, 0xd0, 0x06, 0x85, 0x26, 0xd4, 0x60, 0xbf, 0x62, 0x4f, 0x61, 0xa2, 0x50, 0x57, 0xb2, 0xd4, 0x18, 0xeb, 0xe2, 0x27, 0xe4, 0x7b, 0x14, 0xce, 0xb8, 0x01, 0xcf, 0x8b, 0x9f, 0xd0, 0x9d, 0x7d, 0x89, 0x4a, 0xa1, 0xe2, 0x53, 0x57, 0x9d, 0x66, 0x6d, 0xab, 0x53, 0x6b, 0x54, 0x71, 0x92, 0x63, 0x69, 0xf8, 0x8c, 0xac, 0x43, 0x8b, 0xbc, 0xb0, 0x00, 0x0b, 0x61, 0x52, 0x2b, 0x11, 0xaf, 0x93, 0x2a, 0xc6, 0xd2, 0xa8, 0x6b, 0xbe, 0xef, 0x62, 0xab, 0x95, 0x78, 0x95, 0x54, 0x27, 0x16, 0xb2, 0xdb, 0xa7, 0x72, 0xfd, 0x8f, 0xa2, 0xc4, 0x8c, 0x33, 0x97, 0x5a, 0xb3, 0xb6, 0x0c, 0x4c, 0xaa, 0x22, 0x6e, 0x8a, 0x75, 0x67, 0x1e, 0x2c, 0xba, 0x11, 0x24, 0x55, 0xf1, 0xca, 0xd7, 0x8b, 0xc1, 0xce, 0x4a, 0x6a, 0xc3, 0x0f, 0xe8, 0x64, 0x7a, 0xb6, 0x58, 0x6a, 0xb1, 0xbb, 0xf3, 0x60, 0x11, 0x44, 0xf4, 0xcc, 0x9e, 0xc1, 0xd4, 0x24, 0xfa, 0x6d, 0xfc, 0x43, 0x8d, 0x35, 0xc6, 0xd4, 0xe8, 0x7b, 0xf4, 0xca, 0xc4, 0xc2, 0xdf, 0x59, 0xf4, 0xb5, 0xed, 0xf6, 0x43, 0x18, 0x92, 0x1f, 0x79, 0x7c, 0xe0, 0x92, 0xb5, 0x00, 0x19, 0x0f, 0xe1, 0xce, 0x8f, 0x89, 0x8e, 0x85, 0x4c, 0xb2, 0xa2, 0xcc, 0x63, 0xcf, 0x3e, 0xce, 0xe7, 0xc1, 0x62, 0x10, 0xed, 0xff, 0x98, 0xe8, 0xa5, 0xb3, 0x34, 0x83, 0xfb, 0x04, 0xc6, 0x15, 0x96, 0xe4, 0x4b, 0xfc, 0xb8, 0x4f, 0xe1, 0x8f, 0x3c, 0x46, 0x1c, 0xf9, 0xd8, 0x36, 0xa0, 0x12, 0x45, 0x9a, 0xc4, 0x45, 0x99, 0xe1, 0x15, 0x7f, 0x30, 0x0f, 0x16, 0xbd, 0xe3, 0xce, 0xa7, 0x9f, 0xd9, 0x26, 0x90, 0xe1, 0xd4, 0xe2, 0x6c, 0x0e, 0x83, 0xcb, 0xa2, 0x2c, 0xf4, 0x0a, 0x33, 0xfe, 0xd0, 0x1e, 0x78, 0xbc, 0x63, 0x54, 0x8d, 0x51, 0x8b, 0xda, 0xd0, 0x53, 0x21, 0x4b, 0x8c, 0xdf, 0xe2, 0x35, 0xff, 0x3d, 0x09, 0xc0, 0x80, 0x80, 0x6f, 0xf1, 0x9a, 0x3d, 0x83, 0x1d, 0x52, 0xab, 0x47, 0xa4, 0x56, 0x6c, 0x7b, 0x3a, 0x48, 0xa6, 0xc8, 0xce, 0xfe, 0x08, 0x33, 0xfb, 0xaf, 0xe3, 0xa2, 0x4c, 0xe5, 0xba, 0x12, 0x68, 0x90, 0x7f, 0x48, 0xf9, 0x4d, 0x09, 0x3f, 0x6d, 0x61, 0xf6, 0x09, 0x30, 0x3b, 0xed, 0x6e, 0x9b, 0x58, 0xa1, 0xc0, 0x44, 0x23, 0x7f, 0x46, 0x07, 0xcf, 0x92, 0xaa, 0x3a, 0x21, 0x43, 0xe4, 0x70, 0xdb, 0x49, 0xbc, 0x2a, 0x4c, 0xac, 0x30, 0xd1, 0xb2, 0xe4, 0x7f, 0xb0, 0x69, 0x46, 0x60, 0xa1, 0x88, 0x10, 0xf6, 0x05, 0xdc, 0xb3, 0xc5, 0x35, 0x2b, 0x25, 0x8d, 0x11, 0x98, 0xc5, 0x97, 0x52, 0xb9, 0xb2, 0x3d, 0xa6, 0xf3, 0x6d, 0xe9, 0x2f, 0x1a, 0xe3, 0xd7, 0x52, 0x51, 0xf9, 0xbe, 0x84, 0x07, 0x3f, 0x7f, 0xc9, 0xf7, 0x45, 0xf3, 0x39, 0xbd, 0xf8, 0xc1, 0xad, 0x17, 0x7d, 0x77, 0x34, 0xdd, 0x17, 0xed, 0x8b, 0x74, 0xd2, 0x13, 0x6a, 0xd0, 0xa4, 0x45, 0xe9, 0x8c, 0xc7, 0x30, 0xb2, 0x97, 0x1a, 0x2a, 0x47, 0x8a, 0x90, 0x12, 0x04, 0x07, 0x59, 0x5a, 0x84, 0x7f, 0x83, 0xd9, 0x52, 0xe6, 0xaf, 0x48, 0xc8, 0x9a, 0x81, 0xdb, 0xd2, 0xbc, 0xe0, 0x7d, 0x35, 0x2f, 0xd8, 0xd2, 0xbc, 0xf0, 0xbf, 0x3d, 0xd8, 0x5b, 0xca, 0x3c, 0xc2, 0x24, 0x6b, 0x28, 0xf5, 0x0b, 0x12, 0x7b, 0x7b, 0xa3, 0xee, 0xb6, 0x78, 0x7e, 0x05, 0x7b, 0x3e, 0x9a, 0x46, 0x23, 0xee, 0x10, 0x0f, 0x1e, 0x6e, 0xf3, 0x60, 0x2b, 0x85, 0x68, 0xb2, 0xde, 0xca, 0x68, 0x5b, 0x07, 0xbb, 0x54, 0xa9, 0x5f, 0xd0, 0xc1, 0x1d, 0x32, 0xb6, 0x3a, 0x78, 0xa3, 0xcd, 0xbd, 0xf7, 0xd0, 0xe6, 0x6d, 0xa1, 0xdf, 0x9d, 0x77, 0xb7, 0x85, 0xfe, 0x39, 0xec, 0xaf, 0x8b, 0xb2, 0x58, 0xd7, 0xeb, 0x98, 0xae, 0x60, 0xba, 0xb5, 0xfa, 0xc4, 0xa6, 0xa9, 0x37, 0x58, 0x46, 0xd3, 0xfd, 0xf5, 0x29, 0xb0, 0xa2, 0x4c, 0x45, 0x9d, 0xe1, 0x26, 0x9d, 0x07, 0x6e, 0x5c, 0xbd, 0x65, 0x83, 0xd0, 0x07, 0xd0, 0x4b, 0x65, 0x5d, 0x1a, 0x3e, 0xa4, 0xf8, 0xdd, 0xc2, 0xd2, 0xbc, 0x91, 0x23, 0x3a, 0x51, 0x61, 0x8e, 0x57, 0x7c, 0x8f, 0x7a, 0x35, 0x6b, 0x2c, 0xd4, 0xa5, 0x1c, 0xaf, 0x6c, 0xf4, 0x56, 0x83, 0xbc, 0x97, 0x53, 0xcb, 0xa1, 0x45, 0x9c, 0xf9, 0xe9, 0xed, 0x71, 0x9f, 0x51, 0xe4, 0xdb, 0xa3, 0xbe, 0x80, 0x59, 0x13, 0xb6, 0xed, 0x35, 0x7d, 0x23, 0x00, 0x05, 0xbd, 0xe7, 0x71, 0xf7, 0x75, 0xa1, 0xd9, 0x11, 0x1c, 0x34, 0x1e, 0x71, 0x85, 0x2d, 0xf3, 0xf9, 0x3e, 0xed, 0xba, 0x9f, 0x38, 0xb7, 0xbf, 0xa2, 0xda, 0x50, 0xa4, 0x66, 0x6b, 0x92, 0xcd, 0x11, 0x6d, 0x3b, 0xf2, 0xd8, 0x37, 0x56, 0x29, 0x1f, 0xc3, 0xa8, 0x3d, 0x5d, 0x08, 0x3e, 0x26, 0x0f, 0x68, 0x0e, 0x16, 0xc2, 0x8e, 0x4d, 0x9a, 0xa4, 0x2b, 0x8c, 0x0b, 0x83, 0x2a, 0x31, 0x52, 0xf1, 0x09, 0xf9, 0x4c, 0x08, 0x3d, 0xf5, 0xa0, 0xad, 0x44, 0x59, 0xaf, 0x63, 0xbd, 0x4a, 0x54, 0xa6, 0x39, 0xa3, 0x88, 0x86, 0x65, 0xbd, 0x3e, 0x27, 0x20, 0xfc, 0x57, 0x40, 0xdf, 0x83, 0x8e, 0xdb, 0xee, 0xb2, 0x61, 0x1f, 0x43, 0x57, 0xc8, 0x9c, 0x07, 0xc4, 0xcd, 0xbb, 0x1b, 0x2c, 0xb9, 0xf9, 0xc6, 0x88, 0xac, 0xc7, 0x06, 0xa3, 0x3a, 0xef, 0xc1, 0xa8, 0x10, 0x26, 0x22, 0xd1, 0x26, 0x6e, 0xf9, 0xe9, 0xc8, 0x3b, 0xb2, 0xe0, 0x89, 0xe3, 0x68, 0xf8, 0x9f, 0x80, 0x46, 0xed, 0x8d, 0xfd, 0xac, 0x89, 0x30, 0x95, 0xea, 0xf6, 0x4c, 0x05, 0xb7, 0x86, 0xf3, 0xd6, 0x3c, 0x74, 0x5c, 0x7e, 0xff, 0x7f, 0x1e, 0xba, 0x64, 0x6c, 0xe7, 0xa1, 0xe5, 0xd9, 0xce, 0x26, 0xcf, 0x1e, 0x01, 0x18, 0x69, 0x12, 0xe1, 0xee, 0xe1, 0x9e, 0x9b, 0x2f, 0x42, 0xe8, 0x12, 0xe6, 0xd0, 0x57, 0x14, 0x97, 0xe6, 0xbb, 0x6e, 0x3b, 0xbf, 0x0c, 0xff, 0xdd, 0xa1, 0x4a, 0xfa, 0xd0, 0x7f, 0x8b, 0x4c, 0xfc, 0x7c, 0xc4, 0x7b, 0xbf, 0x36, 0xe2, 0xbd, 0xcd, 0x11, 0x9f, 0xd9, 0xcf, 0x11, 0x51, 0x1b, 0xbb, 0xf7, 0x4a, 0xd6, 0x4a, 0x53, 0x0a, 0x93, 0xe3, 0xe0, 0xb3, 0x68, 0x7a, 0x63, 0xfa, 0xc6, 0x5a, 0xec, 0x25, 0xe3, 0x07, 0xa7, 0xd1, 0x23, 0x97, 0xd4, 0x20, 0x9a, 0x7a, 0xdc, 0x8b, 0x0e, 0x7d, 0xa0, 0xd4, 0x36, 0xb1, 0x56, 0xb8, 0xdc, 0xa8, 0x8f, 0x09, 0x6c, 0xa4, 0xe9, 0x29, 0x4c, 0x9a, 0x7d, 0x62, 0x59, 0x8a, 0x6b, 0x3f, 0xe2, 0xe3, 0x06, 0x3c, 0x2b, 0xc5, 0x75, 0x78, 0x45, 0x2a, 0xed, 0xab, 0xe4, 0x09, 0x77, 0x04, 0x3d, 0xda, 0xc8, 0x53, 0xee, 0xfe, 0x36, 0x8d, 0x36, 0xc8, 0x10, 0x39, 0x3f, 0xf6, 0x05, 0xf4, 0x75, 0xbd, 0x5e, 0x27, 0xea, 0xda, 0x33, 0xef, 0x57, 0x5e, 0x69, 0x3c, 0xbf, 0xea, 0xfd, 0xdd, 0x92, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd9, 0xa0, 0xf8, 0x48, 0x0d, 0x00, 0x00, }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/log/log_service.proto
syntax = "proto2"; option go_package = "log"; package appengine; message LogServiceError { enum ErrorCode { OK = 0; INVALID_REQUEST = 1; STORAGE_ERROR = 2; } } message UserAppLogLine { required int64 timestamp_usec = 1; required int64 level = 2; required string message = 3; } message UserAppLogGroup { repeated UserAppLogLine log_line = 2; } message FlushRequest { optional bytes logs = 1; } message SetStatusRequest { required string status = 1; } message LogOffset { optional bytes request_id = 1; } message LogLine { required int64 time = 1; required int32 level = 2; required string log_message = 3; } message RequestLog { required string app_id = 1; optional string module_id = 37 [default="default"]; required string version_id = 2; required bytes request_id = 3; optional LogOffset offset = 35; required string ip = 4; optional string nickname = 5; required int64 start_time = 6; required int64 end_time = 7; required int64 latency = 8; required int64 mcycles = 9; required string method = 10; required string resource = 11; required string http_version = 12; required int32 status = 13; required int64 response_size = 14; optional string referrer = 15; optional string user_agent = 16; required string url_map_entry = 17; required string combined = 18; optional int64 api_mcycles = 19; optional string host = 20; optional double cost = 21; optional string task_queue_name = 22; optional string task_name = 23; optional bool was_loading_request = 24; optional int64 pending_time = 25; optional int32 replica_index = 26 [default = -1]; optional bool finished = 27 [default = true]; optional bytes clone_key = 28; repeated LogLine line = 29; optional bool lines_incomplete = 36; optional bytes app_engine_release = 38; optional int32 exit_reason = 30; optional bool was_throttled_for_time = 31; optional bool was_throttled_for_requests = 32; optional int64 throttled_time = 33; optional bytes server_name = 34; } message LogModuleVersion { optional string module_id = 1 [default="default"]; optional string version_id = 2; } message LogReadRequest { required string app_id = 1; repeated string version_id = 2; repeated LogModuleVersion module_version = 19; optional int64 start_time = 3; optional int64 end_time = 4; optional LogOffset offset = 5; repeated bytes request_id = 6; optional int32 minimum_log_level = 7; optional bool include_incomplete = 8; optional int64 count = 9; optional string combined_log_regex = 14; optional string host_regex = 15; optional int32 replica_index = 16; optional bool include_app_logs = 10; optional int32 app_logs_per_request = 17; optional bool include_host = 11; optional bool include_all = 12; optional bool cache_iterator = 13; optional int32 num_shards = 18; } message LogReadResponse { repeated RequestLog log = 1; optional LogOffset offset = 2; optional int64 last_end_time = 3; } message LogUsageRecord { optional string version_id = 1; optional int32 start_time = 2; optional int32 end_time = 3; optional int64 count = 4; optional int64 total_size = 5; optional int32 records = 6; } message LogUsageRequest { required string app_id = 1; repeated string version_id = 2; optional int32 start_time = 3; optional int32 end_time = 4; optional uint32 resolution_hours = 5 [default = 1]; optional bool combine_versions = 6; optional int32 usage_version = 7; optional bool versions_only = 8; } message LogUsageResponse { repeated LogUsageRecord usage = 1; optional LogUsageRecord summary = 2; }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto package urlfetch import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type URLFetchServiceError_ErrorCode int32 const ( URLFetchServiceError_OK URLFetchServiceError_ErrorCode = 0 URLFetchServiceError_INVALID_URL URLFetchServiceError_ErrorCode = 1 URLFetchServiceError_FETCH_ERROR URLFetchServiceError_ErrorCode = 2 URLFetchServiceError_UNSPECIFIED_ERROR URLFetchServiceError_ErrorCode = 3 URLFetchServiceError_RESPONSE_TOO_LARGE URLFetchServiceError_ErrorCode = 4 URLFetchServiceError_DEADLINE_EXCEEDED URLFetchServiceError_ErrorCode = 5 URLFetchServiceError_SSL_CERTIFICATE_ERROR URLFetchServiceError_ErrorCode = 6 URLFetchServiceError_DNS_ERROR URLFetchServiceError_ErrorCode = 7 URLFetchServiceError_CLOSED URLFetchServiceError_ErrorCode = 8 URLFetchServiceError_INTERNAL_TRANSIENT_ERROR URLFetchServiceError_ErrorCode = 9 URLFetchServiceError_TOO_MANY_REDIRECTS URLFetchServiceError_ErrorCode = 10 URLFetchServiceError_MALFORMED_REPLY URLFetchServiceError_ErrorCode = 11 URLFetchServiceError_CONNECTION_ERROR URLFetchServiceError_ErrorCode = 12 ) var URLFetchServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "INVALID_URL", 2: "FETCH_ERROR", 3: "UNSPECIFIED_ERROR", 4: "RESPONSE_TOO_LARGE", 5: "DEADLINE_EXCEEDED", 6: "SSL_CERTIFICATE_ERROR", 7: "DNS_ERROR", 8: "CLOSED", 9: "INTERNAL_TRANSIENT_ERROR", 10: "TOO_MANY_REDIRECTS", 11: "MALFORMED_REPLY", 12: "CONNECTION_ERROR", } var URLFetchServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "INVALID_URL": 1, "FETCH_ERROR": 2, "UNSPECIFIED_ERROR": 3, "RESPONSE_TOO_LARGE": 4, "DEADLINE_EXCEEDED": 5, "SSL_CERTIFICATE_ERROR": 6, "DNS_ERROR": 7, "CLOSED": 8, "INTERNAL_TRANSIENT_ERROR": 9, "TOO_MANY_REDIRECTS": 10, "MALFORMED_REPLY": 11, "CONNECTION_ERROR": 12, } func (x URLFetchServiceError_ErrorCode) Enum() *URLFetchServiceError_ErrorCode { p := new(URLFetchServiceError_ErrorCode) *p = x return p } func (x URLFetchServiceError_ErrorCode) String() string { return proto.EnumName(URLFetchServiceError_ErrorCode_name, int32(x)) } func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode") if err != nil { return err } *x = URLFetchServiceError_ErrorCode(value) return nil } func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0, 0} } type URLFetchRequest_RequestMethod int32 const ( URLFetchRequest_GET URLFetchRequest_RequestMethod = 1 URLFetchRequest_POST URLFetchRequest_RequestMethod = 2 URLFetchRequest_HEAD URLFetchRequest_RequestMethod = 3 URLFetchRequest_PUT URLFetchRequest_RequestMethod = 4 URLFetchRequest_DELETE URLFetchRequest_RequestMethod = 5 URLFetchRequest_PATCH URLFetchRequest_RequestMethod = 6 ) var URLFetchRequest_RequestMethod_name = map[int32]string{ 1: "GET", 2: "POST", 3: "HEAD", 4: "PUT", 5: "DELETE", 6: "PATCH", } var URLFetchRequest_RequestMethod_value = map[string]int32{ "GET": 1, "POST": 2, "HEAD": 3, "PUT": 4, "DELETE": 5, "PATCH": 6, } func (x URLFetchRequest_RequestMethod) Enum() *URLFetchRequest_RequestMethod { p := new(URLFetchRequest_RequestMethod) *p = x return p } func (x URLFetchRequest_RequestMethod) String() string { return proto.EnumName(URLFetchRequest_RequestMethod_name, int32(x)) } func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod") if err != nil { return err } *x = URLFetchRequest_RequestMethod(value) return nil } func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) { return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} } type URLFetchServiceError struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} } func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) } func (*URLFetchServiceError) ProtoMessage() {} func (*URLFetchServiceError) Descriptor() ([]byte, []int) { return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0} } func (m *URLFetchServiceError) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_URLFetchServiceError.Unmarshal(m, b) } func (m *URLFetchServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_URLFetchServiceError.Marshal(b, m, deterministic) } func (dst *URLFetchServiceError) XXX_Merge(src proto.Message) { xxx_messageInfo_URLFetchServiceError.Merge(dst, src) } func (m *URLFetchServiceError) XXX_Size() int { return xxx_messageInfo_URLFetchServiceError.Size(m) } func (m *URLFetchServiceError) XXX_DiscardUnknown() { xxx_messageInfo_URLFetchServiceError.DiscardUnknown(m) } var xxx_messageInfo_URLFetchServiceError proto.InternalMessageInfo type URLFetchRequest struct { Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"` Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"` Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"` FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"` Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"` MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} } func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) } func (*URLFetchRequest) ProtoMessage() {} func (*URLFetchRequest) Descriptor() ([]byte, []int) { return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1} } func (m *URLFetchRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_URLFetchRequest.Unmarshal(m, b) } func (m *URLFetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_URLFetchRequest.Marshal(b, m, deterministic) } func (dst *URLFetchRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_URLFetchRequest.Merge(dst, src) } func (m *URLFetchRequest) XXX_Size() int { return xxx_messageInfo_URLFetchRequest.Size(m) } func (m *URLFetchRequest) XXX_DiscardUnknown() { xxx_messageInfo_URLFetchRequest.DiscardUnknown(m) } var xxx_messageInfo_URLFetchRequest proto.InternalMessageInfo const Default_URLFetchRequest_FollowRedirects bool = true const Default_URLFetchRequest_MustValidateServerCertificate bool = true func (m *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod { if m != nil && m.Method != nil { return *m.Method } return URLFetchRequest_GET } func (m *URLFetchRequest) GetUrl() string { if m != nil && m.Url != nil { return *m.Url } return "" } func (m *URLFetchRequest) GetHeader() []*URLFetchRequest_Header { if m != nil { return m.Header } return nil } func (m *URLFetchRequest) GetPayload() []byte { if m != nil { return m.Payload } return nil } func (m *URLFetchRequest) GetFollowRedirects() bool { if m != nil && m.FollowRedirects != nil { return *m.FollowRedirects } return Default_URLFetchRequest_FollowRedirects } func (m *URLFetchRequest) GetDeadline() float64 { if m != nil && m.Deadline != nil { return *m.Deadline } return 0 } func (m *URLFetchRequest) GetMustValidateServerCertificate() bool { if m != nil && m.MustValidateServerCertificate != nil { return *m.MustValidateServerCertificate } return Default_URLFetchRequest_MustValidateServerCertificate } type URLFetchRequest_Header struct { Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} } func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) } func (*URLFetchRequest_Header) ProtoMessage() {} func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} } func (m *URLFetchRequest_Header) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_URLFetchRequest_Header.Unmarshal(m, b) } func (m *URLFetchRequest_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_URLFetchRequest_Header.Marshal(b, m, deterministic) } func (dst *URLFetchRequest_Header) XXX_Merge(src proto.Message) { xxx_messageInfo_URLFetchRequest_Header.Merge(dst, src) } func (m *URLFetchRequest_Header) XXX_Size() int { return xxx_messageInfo_URLFetchRequest_Header.Size(m) } func (m *URLFetchRequest_Header) XXX_DiscardUnknown() { xxx_messageInfo_URLFetchRequest_Header.DiscardUnknown(m) } var xxx_messageInfo_URLFetchRequest_Header proto.InternalMessageInfo func (m *URLFetchRequest_Header) GetKey() string { if m != nil && m.Key != nil { return *m.Key } return "" } func (m *URLFetchRequest_Header) GetValue() string { if m != nil && m.Value != nil { return *m.Value } return "" } type URLFetchResponse struct { Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"` StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"` Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"` ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"` ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"` FinalUrl *string `protobuf:"bytes,9,opt,name=FinalUrl" json:"FinalUrl,omitempty"` ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"` ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"` ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} } func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) } func (*URLFetchResponse) ProtoMessage() {} func (*URLFetchResponse) Descriptor() ([]byte, []int) { return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2} } func (m *URLFetchResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_URLFetchResponse.Unmarshal(m, b) } func (m *URLFetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_URLFetchResponse.Marshal(b, m, deterministic) } func (dst *URLFetchResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_URLFetchResponse.Merge(dst, src) } func (m *URLFetchResponse) XXX_Size() int { return xxx_messageInfo_URLFetchResponse.Size(m) } func (m *URLFetchResponse) XXX_DiscardUnknown() { xxx_messageInfo_URLFetchResponse.DiscardUnknown(m) } var xxx_messageInfo_URLFetchResponse proto.InternalMessageInfo const Default_URLFetchResponse_ContentWasTruncated bool = false const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0 const Default_URLFetchResponse_ApiBytesSent int64 = 0 const Default_URLFetchResponse_ApiBytesReceived int64 = 0 func (m *URLFetchResponse) GetContent() []byte { if m != nil { return m.Content } return nil } func (m *URLFetchResponse) GetStatusCode() int32 { if m != nil && m.StatusCode != nil { return *m.StatusCode } return 0 } func (m *URLFetchResponse) GetHeader() []*URLFetchResponse_Header { if m != nil { return m.Header } return nil } func (m *URLFetchResponse) GetContentWasTruncated() bool { if m != nil && m.ContentWasTruncated != nil { return *m.ContentWasTruncated } return Default_URLFetchResponse_ContentWasTruncated } func (m *URLFetchResponse) GetExternalBytesSent() int64 { if m != nil && m.ExternalBytesSent != nil { return *m.ExternalBytesSent } return 0 } func (m *URLFetchResponse) GetExternalBytesReceived() int64 { if m != nil && m.ExternalBytesReceived != nil { return *m.ExternalBytesReceived } return 0 } func (m *URLFetchResponse) GetFinalUrl() string { if m != nil && m.FinalUrl != nil { return *m.FinalUrl } return "" } func (m *URLFetchResponse) GetApiCpuMilliseconds() int64 { if m != nil && m.ApiCpuMilliseconds != nil { return *m.ApiCpuMilliseconds } return Default_URLFetchResponse_ApiCpuMilliseconds } func (m *URLFetchResponse) GetApiBytesSent() int64 { if m != nil && m.ApiBytesSent != nil { return *m.ApiBytesSent } return Default_URLFetchResponse_ApiBytesSent } func (m *URLFetchResponse) GetApiBytesReceived() int64 { if m != nil && m.ApiBytesReceived != nil { return *m.ApiBytesReceived } return Default_URLFetchResponse_ApiBytesReceived } type URLFetchResponse_Header struct { Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} } func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) } func (*URLFetchResponse_Header) ProtoMessage() {} func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2, 0} } func (m *URLFetchResponse_Header) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_URLFetchResponse_Header.Unmarshal(m, b) } func (m *URLFetchResponse_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_URLFetchResponse_Header.Marshal(b, m, deterministic) } func (dst *URLFetchResponse_Header) XXX_Merge(src proto.Message) { xxx_messageInfo_URLFetchResponse_Header.Merge(dst, src) } func (m *URLFetchResponse_Header) XXX_Size() int { return xxx_messageInfo_URLFetchResponse_Header.Size(m) } func (m *URLFetchResponse_Header) XXX_DiscardUnknown() { xxx_messageInfo_URLFetchResponse_Header.DiscardUnknown(m) } var xxx_messageInfo_URLFetchResponse_Header proto.InternalMessageInfo func (m *URLFetchResponse_Header) GetKey() string { if m != nil && m.Key != nil { return *m.Key } return "" } func (m *URLFetchResponse_Header) GetValue() string { if m != nil && m.Value != nil { return *m.Value } return "" } func init() { proto.RegisterType((*URLFetchServiceError)(nil), "appengine.URLFetchServiceError") proto.RegisterType((*URLFetchRequest)(nil), "appengine.URLFetchRequest") proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header") proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse") proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header") } func init() { proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor_urlfetch_service_b245a7065f33bced) } var fileDescriptor_urlfetch_service_b245a7065f33bced = []byte{ // 770 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54, 0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29, 0x17, 0x90, 0x2e, 0x2b, 0x24, 0x44, 0xaf, 0x70, 0xed, 0x93, 0xad, 0xa9, 0x63, 0x47, 0xc7, 0x4e, 0x61, 0xb9, 0xb1, 0xac, 0x78, 0x9a, 0x5a, 0xb2, 0xec, 0x60, 0x9f, 0x2c, 0xf4, 0x35, 0x78, 0x0d, 0xde, 0x87, 0xa7, 0xe1, 0x02, 0x9d, 0xc4, 0xc9, 0x6e, 0xbb, 0xd1, 0x4a, 0x5c, 0x65, 0xe6, 0x9b, 0xef, 0xcc, 0x99, 0x7c, 0xdf, 0xf8, 0x80, 0xb3, 0x2c, 0xcb, 0x65, 0x4e, 0xe3, 0x65, 0x99, 0x27, 0xc5, 0x72, 0x5c, 0x56, 0xcb, 0xf3, 0x64, 0xb5, 0xa2, 0x62, 0x99, 0x15, 0x74, 0x9e, 0x15, 0x92, 0xaa, 0x22, 0xc9, 0xcf, 0xd7, 0x55, 0x7e, 0x4b, 0x72, 0x71, 0xb7, 0x0f, 0xe2, 0x9a, 0xaa, 0xb7, 0xd9, 0x82, 0xc6, 0xab, 0xaa, 0x94, 0x25, 0xf6, 0xf7, 0x67, 0x86, 0x7f, 0xeb, 0x70, 0x3a, 0x17, 0xde, 0x44, 0xb1, 0xc2, 0x2d, 0x89, 0x57, 0x55, 0x59, 0x0d, 0xff, 0xd2, 0xa1, 0xbf, 0x89, 0xec, 0x32, 0x25, 0xec, 0x80, 0x1e, 0x5c, 0xb3, 0x4f, 0xf0, 0x04, 0x8e, 0x5c, 0xff, 0xc6, 0xf2, 0x5c, 0x27, 0x9e, 0x0b, 0x8f, 0x69, 0x0a, 0x98, 0xf0, 0xc8, 0xbe, 0x8a, 0xb9, 0x10, 0x81, 0x60, 0x3a, 0x9e, 0xc1, 0xd3, 0xb9, 0x1f, 0xce, 0xb8, 0xed, 0x4e, 0x5c, 0xee, 0x34, 0xb0, 0x81, 0x9f, 0x01, 0x0a, 0x1e, 0xce, 0x02, 0x3f, 0xe4, 0x71, 0x14, 0x04, 0xb1, 0x67, 0x89, 0xd7, 0x9c, 0xb5, 0x14, 0xdd, 0xe1, 0x96, 0xe3, 0xb9, 0x3e, 0x8f, 0xf9, 0xaf, 0x36, 0xe7, 0x0e, 0x77, 0x58, 0x1b, 0x3f, 0x87, 0xb3, 0x30, 0xf4, 0x62, 0x9b, 0x8b, 0xc8, 0x9d, 0xb8, 0xb6, 0x15, 0xf1, 0xa6, 0x53, 0x07, 0x9f, 0x40, 0xdf, 0xf1, 0xc3, 0x26, 0xed, 0x22, 0x40, 0xc7, 0xf6, 0x82, 0x90, 0x3b, 0xac, 0x87, 0x2f, 0xc0, 0x74, 0xfd, 0x88, 0x0b, 0xdf, 0xf2, 0xe2, 0x48, 0x58, 0x7e, 0xe8, 0x72, 0x3f, 0x6a, 0x98, 0x7d, 0x35, 0x82, 0xba, 0x79, 0x6a, 0xf9, 0x6f, 0x62, 0xc1, 0x1d, 0x57, 0x70, 0x3b, 0x0a, 0x19, 0xe0, 0x33, 0x38, 0x99, 0x5a, 0xde, 0x24, 0x10, 0x53, 0xee, 0xc4, 0x82, 0xcf, 0xbc, 0x37, 0xec, 0x08, 0x4f, 0x81, 0xd9, 0x81, 0xef, 0x73, 0x3b, 0x72, 0x03, 0xbf, 0x69, 0x71, 0x3c, 0xfc, 0xc7, 0x80, 0x93, 0x9d, 0x5a, 0x82, 0x7e, 0x5f, 0x53, 0x2d, 0xf1, 0x27, 0xe8, 0x4c, 0x49, 0xde, 0x95, 0xa9, 0xa9, 0x0d, 0xf4, 0xd1, 0xa7, 0xaf, 0x46, 0xe3, 0xbd, 0xba, 0xe3, 0x47, 0xdc, 0x71, 0xf3, 0xbb, 0xe5, 0x8b, 0xe6, 0x1c, 0x32, 0x30, 0xe6, 0x55, 0x6e, 0xea, 0x03, 0x7d, 0xd4, 0x17, 0x2a, 0xc4, 0x1f, 0xa1, 0x73, 0x47, 0x49, 0x4a, 0x95, 0x69, 0x0c, 0x8c, 0x11, 0xbc, 0xfa, 0xea, 0x23, 0x3d, 0xaf, 0x36, 0x44, 0xd1, 0x1c, 0xc0, 0x17, 0xd0, 0x9d, 0x25, 0xf7, 0x79, 0x99, 0xa4, 0x66, 0x67, 0xa0, 0x8d, 0x8e, 0x2f, 0xf5, 0x9e, 0x26, 0x76, 0x10, 0x8e, 0xe1, 0x64, 0x52, 0xe6, 0x79, 0xf9, 0x87, 0xa0, 0x34, 0xab, 0x68, 0x21, 0x6b, 0xb3, 0x3b, 0xd0, 0x46, 0xbd, 0x8b, 0x96, 0xac, 0xd6, 0x24, 0x1e, 0x17, 0xf1, 0x39, 0xf4, 0x1c, 0x4a, 0xd2, 0x3c, 0x2b, 0xc8, 0xec, 0x0d, 0xb4, 0x91, 0x26, 0xf6, 0x39, 0xfe, 0x0c, 0x5f, 0x4c, 0xd7, 0xb5, 0xbc, 0x49, 0xf2, 0x2c, 0x4d, 0x24, 0xa9, 0xed, 0xa1, 0xca, 0xa6, 0x4a, 0x66, 0xb7, 0xd9, 0x22, 0x91, 0x64, 0xf6, 0xdf, 0xeb, 0xfc, 0x71, 0xea, 0xf3, 0x97, 0xd0, 0xd9, 0xfe, 0x0f, 0x25, 0xc6, 0x35, 0xdd, 0x9b, 0xad, 0xad, 0x18, 0xd7, 0x74, 0x8f, 0xa7, 0xd0, 0xbe, 0x49, 0xf2, 0x35, 0x99, 0xed, 0x0d, 0xb6, 0x4d, 0x86, 0x1e, 0x3c, 0x79, 0xa0, 0x26, 0x76, 0xc1, 0x78, 0xcd, 0x23, 0xa6, 0x61, 0x0f, 0x5a, 0xb3, 0x20, 0x8c, 0x98, 0xae, 0xa2, 0x2b, 0x6e, 0x39, 0xcc, 0x50, 0xc5, 0xd9, 0x3c, 0x62, 0x2d, 0xb5, 0x2e, 0x0e, 0xf7, 0x78, 0xc4, 0x59, 0x1b, 0xfb, 0xd0, 0x9e, 0x59, 0x91, 0x7d, 0xc5, 0x3a, 0xc3, 0x7f, 0x0d, 0x60, 0xef, 0x84, 0xad, 0x57, 0x65, 0x51, 0x13, 0x9a, 0xd0, 0xb5, 0xcb, 0x42, 0x52, 0x21, 0x4d, 0x4d, 0x49, 0x29, 0x76, 0x29, 0x7e, 0x09, 0x10, 0xca, 0x44, 0xae, 0x6b, 0xf5, 0x71, 0x6c, 0x8c, 0x6b, 0x8b, 0xf7, 0x10, 0xbc, 0x78, 0xe4, 0xdf, 0xf0, 0xa0, 0x7f, 0xdb, 0x6b, 0x1e, 0x1b, 0xf8, 0x03, 0x3c, 0x6b, 0xae, 0xf9, 0x25, 0xa9, 0xa3, 0x6a, 0x5d, 0x28, 0x81, 0xb6, 0x66, 0xf6, 0x2e, 0xda, 0xb7, 0x49, 0x5e, 0x93, 0x38, 0xc4, 0xc0, 0x6f, 0xe0, 0x29, 0xff, 0x73, 0xfb, 0x02, 0x5c, 0xde, 0x4b, 0xaa, 0x43, 0x35, 0xb8, 0x72, 0xd7, 0x10, 0x1f, 0x16, 0xf0, 0x7b, 0x38, 0x7b, 0x00, 0x0a, 0x5a, 0x50, 0xf6, 0x96, 0xd2, 0x8d, 0xcd, 0x86, 0x38, 0x5c, 0x54, 0xfb, 0x30, 0xc9, 0x8a, 0x24, 0x57, 0xfb, 0xaa, 0xec, 0xed, 0x8b, 0x7d, 0x8e, 0xdf, 0x01, 0x5a, 0xab, 0xcc, 0x5e, 0xad, 0xa7, 0x59, 0x9e, 0x67, 0x35, 0x2d, 0xca, 0x22, 0xad, 0x4d, 0x50, 0xed, 0x2e, 0xb4, 0x97, 0xe2, 0x40, 0x11, 0xbf, 0x86, 0x63, 0x6b, 0x95, 0xbd, 0x9b, 0xf6, 0x68, 0x47, 0x7e, 0x00, 0xe3, 0xb7, 0xc0, 0x76, 0xf9, 0x7e, 0xcc, 0xe3, 0x1d, 0xf5, 0x83, 0xd2, 0xff, 0x5f, 0xa6, 0x4b, 0xf8, 0xad, 0xb7, 0x7b, 0x2a, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x9f, 0x6d, 0x24, 0x63, 0x05, 0x00, 0x00, }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
syntax = "proto2"; option go_package = "urlfetch"; package appengine; message URLFetchServiceError { enum ErrorCode { OK = 0; INVALID_URL = 1; FETCH_ERROR = 2; UNSPECIFIED_ERROR = 3; RESPONSE_TOO_LARGE = 4; DEADLINE_EXCEEDED = 5; SSL_CERTIFICATE_ERROR = 6; DNS_ERROR = 7; CLOSED = 8; INTERNAL_TRANSIENT_ERROR = 9; TOO_MANY_REDIRECTS = 10; MALFORMED_REPLY = 11; CONNECTION_ERROR = 12; } } message URLFetchRequest { enum RequestMethod { GET = 1; POST = 2; HEAD = 3; PUT = 4; DELETE = 5; PATCH = 6; } required RequestMethod Method = 1; required string Url = 2; repeated group Header = 3 { required string Key = 4; required string Value = 5; } optional bytes Payload = 6 [ctype=CORD]; optional bool FollowRedirects = 7 [default=true]; optional double Deadline = 8; optional bool MustValidateServerCertificate = 9 [default=true]; } message URLFetchResponse { optional bytes Content = 1; required int32 StatusCode = 2; repeated group Header = 3 { required string Key = 4; required string Value = 5; } optional bool ContentWasTruncated = 6 [default=false]; optional int64 ExternalBytesSent = 7; optional int64 ExternalBytesReceived = 8; optional string FinalUrl = 9; optional int64 ApiCpuMilliseconds = 10 [default=0]; optional int64 ApiBytesSent = 11 [default=0]; optional int64 ApiBytesReceived = 12 [default=0]; }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/base/api_base.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google.golang.org/appengine/internal/base/api_base.proto package base import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type StringProto struct { Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *StringProto) Reset() { *m = StringProto{} } func (m *StringProto) String() string { return proto.CompactTextString(m) } func (*StringProto) ProtoMessage() {} func (*StringProto) Descriptor() ([]byte, []int) { return fileDescriptor_api_base_9d49f8792e0c1140, []int{0} } func (m *StringProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StringProto.Unmarshal(m, b) } func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_StringProto.Marshal(b, m, deterministic) } func (dst *StringProto) XXX_Merge(src proto.Message) { xxx_messageInfo_StringProto.Merge(dst, src) } func (m *StringProto) XXX_Size() int { return xxx_messageInfo_StringProto.Size(m) } func (m *StringProto) XXX_DiscardUnknown() { xxx_messageInfo_StringProto.DiscardUnknown(m) } var xxx_messageInfo_StringProto proto.InternalMessageInfo func (m *StringProto) GetValue() string { if m != nil && m.Value != nil { return *m.Value } return "" } type Integer32Proto struct { Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Integer32Proto) Reset() { *m = Integer32Proto{} } func (m *Integer32Proto) String() string { return proto.CompactTextString(m) } func (*Integer32Proto) ProtoMessage() {} func (*Integer32Proto) Descriptor() ([]byte, []int) { return fileDescriptor_api_base_9d49f8792e0c1140, []int{1} } func (m *Integer32Proto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Integer32Proto.Unmarshal(m, b) } func (m *Integer32Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Integer32Proto.Marshal(b, m, deterministic) } func (dst *Integer32Proto) XXX_Merge(src proto.Message) { xxx_messageInfo_Integer32Proto.Merge(dst, src) } func (m *Integer32Proto) XXX_Size() int { return xxx_messageInfo_Integer32Proto.Size(m) } func (m *Integer32Proto) XXX_DiscardUnknown() { xxx_messageInfo_Integer32Proto.DiscardUnknown(m) } var xxx_messageInfo_Integer32Proto proto.InternalMessageInfo func (m *Integer32Proto) GetValue() int32 { if m != nil && m.Value != nil { return *m.Value } return 0 } type Integer64Proto struct { Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Integer64Proto) Reset() { *m = Integer64Proto{} } func (m *Integer64Proto) String() string { return proto.CompactTextString(m) } func (*Integer64Proto) ProtoMessage() {} func (*Integer64Proto) Descriptor() ([]byte, []int) { return fileDescriptor_api_base_9d49f8792e0c1140, []int{2} } func (m *Integer64Proto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Integer64Proto.Unmarshal(m, b) } func (m *Integer64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Integer64Proto.Marshal(b, m, deterministic) } func (dst *Integer64Proto) XXX_Merge(src proto.Message) { xxx_messageInfo_Integer64Proto.Merge(dst, src) } func (m *Integer64Proto) XXX_Size() int { return xxx_messageInfo_Integer64Proto.Size(m) } func (m *Integer64Proto) XXX_DiscardUnknown() { xxx_messageInfo_Integer64Proto.DiscardUnknown(m) } var xxx_messageInfo_Integer64Proto proto.InternalMessageInfo func (m *Integer64Proto) GetValue() int64 { if m != nil && m.Value != nil { return *m.Value } return 0 } type BoolProto struct { Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *BoolProto) Reset() { *m = BoolProto{} } func (m *BoolProto) String() string { return proto.CompactTextString(m) } func (*BoolProto) ProtoMessage() {} func (*BoolProto) Descriptor() ([]byte, []int) { return fileDescriptor_api_base_9d49f8792e0c1140, []int{3} } func (m *BoolProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BoolProto.Unmarshal(m, b) } func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BoolProto.Marshal(b, m, deterministic) } func (dst *BoolProto) XXX_Merge(src proto.Message) { xxx_messageInfo_BoolProto.Merge(dst, src) } func (m *BoolProto) XXX_Size() int { return xxx_messageInfo_BoolProto.Size(m) } func (m *BoolProto) XXX_DiscardUnknown() { xxx_messageInfo_BoolProto.DiscardUnknown(m) } var xxx_messageInfo_BoolProto proto.InternalMessageInfo func (m *BoolProto) GetValue() bool { if m != nil && m.Value != nil { return *m.Value } return false } type DoubleProto struct { Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *DoubleProto) Reset() { *m = DoubleProto{} } func (m *DoubleProto) String() string { return proto.CompactTextString(m) } func (*DoubleProto) ProtoMessage() {} func (*DoubleProto) Descriptor() ([]byte, []int) { return fileDescriptor_api_base_9d49f8792e0c1140, []int{4} } func (m *DoubleProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DoubleProto.Unmarshal(m, b) } func (m *DoubleProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DoubleProto.Marshal(b, m, deterministic) } func (dst *DoubleProto) XXX_Merge(src proto.Message) { xxx_messageInfo_DoubleProto.Merge(dst, src) } func (m *DoubleProto) XXX_Size() int { return xxx_messageInfo_DoubleProto.Size(m) } func (m *DoubleProto) XXX_DiscardUnknown() { xxx_messageInfo_DoubleProto.DiscardUnknown(m) } var xxx_messageInfo_DoubleProto proto.InternalMessageInfo func (m *DoubleProto) GetValue() float64 { if m != nil && m.Value != nil { return *m.Value } return 0 } type BytesProto struct { Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *BytesProto) Reset() { *m = BytesProto{} } func (m *BytesProto) String() string { return proto.CompactTextString(m) } func (*BytesProto) ProtoMessage() {} func (*BytesProto) Descriptor() ([]byte, []int) { return fileDescriptor_api_base_9d49f8792e0c1140, []int{5} } func (m *BytesProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BytesProto.Unmarshal(m, b) } func (m *BytesProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BytesProto.Marshal(b, m, deterministic) } func (dst *BytesProto) XXX_Merge(src proto.Message) { xxx_messageInfo_BytesProto.Merge(dst, src) } func (m *BytesProto) XXX_Size() int { return xxx_messageInfo_BytesProto.Size(m) } func (m *BytesProto) XXX_DiscardUnknown() { xxx_messageInfo_BytesProto.DiscardUnknown(m) } var xxx_messageInfo_BytesProto proto.InternalMessageInfo func (m *BytesProto) GetValue() []byte { if m != nil { return m.Value } return nil } type VoidProto struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *VoidProto) Reset() { *m = VoidProto{} } func (m *VoidProto) String() string { return proto.CompactTextString(m) } func (*VoidProto) ProtoMessage() {} func (*VoidProto) Descriptor() ([]byte, []int) { return fileDescriptor_api_base_9d49f8792e0c1140, []int{6} } func (m *VoidProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VoidProto.Unmarshal(m, b) } func (m *VoidProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_VoidProto.Marshal(b, m, deterministic) } func (dst *VoidProto) XXX_Merge(src proto.Message) { xxx_messageInfo_VoidProto.Merge(dst, src) } func (m *VoidProto) XXX_Size() int { return xxx_messageInfo_VoidProto.Size(m) } func (m *VoidProto) XXX_DiscardUnknown() { xxx_messageInfo_VoidProto.DiscardUnknown(m) } var xxx_messageInfo_VoidProto proto.InternalMessageInfo func init() { proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto") proto.RegisterType((*Integer32Proto)(nil), "appengine.base.Integer32Proto") proto.RegisterType((*Integer64Proto)(nil), "appengine.base.Integer64Proto") proto.RegisterType((*BoolProto)(nil), "appengine.base.BoolProto") proto.RegisterType((*DoubleProto)(nil), "appengine.base.DoubleProto") proto.RegisterType((*BytesProto)(nil), "appengine.base.BytesProto") proto.RegisterType((*VoidProto)(nil), "appengine.base.VoidProto") } func init() { proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor_api_base_9d49f8792e0c1140) } var fileDescriptor_api_base_9d49f8792e0c1140 = []byte{ // 199 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30, 0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40, 0x45, 0x9c, 0x83, 0x8b, 0x9b, 0x28, 0x38, 0xb8, 0x48, 0x8a, 0xc7, 0x11, 0x08, 0xb9, 0x90, 0xa6, 0x82, 0xdf, 0x5e, 0xda, 0xd2, 0xfa, 0xc2, 0x9b, 0xed, 0xfe, 0xfc, 0xe0, 0xe1, 0x81, 0x27, 0x62, 0x26, 0x8b, 0x82, 0xd8, 0x6a, 0x47, 0x82, 0x03, 0x49, 0xed, 0x3d, 0x3a, 0x32, 0x0e, 0xa5, 0x71, 0x11, 0x83, 0xd3, 0x56, 0x0e, 0x7a, 0x44, 0xa9, 0xbd, 0xf9, 0x9a, 0x07, 0xe1, 0x03, 0x47, 0xbe, 0x68, 0x76, 0x27, 0xe6, 0x6b, 0xd7, 0x43, 0xfd, 0x1e, 0x83, 0x71, 0xf4, 0xba, 0xbc, 0x2f, 0xa1, 0xf8, 0xd1, 0x76, 0xc2, 0x36, 0xbb, 0xca, 0x6f, 0xab, 0xb7, 0x75, 0xe9, 0x6e, 0xa0, 0x79, 0x71, 0x11, 0x09, 0xc3, 0xfd, 0x5d, 0xc2, 0x15, 0xc7, 0xee, 0xf1, 0x21, 0xe1, 0x4e, 0x36, 0x77, 0x0d, 0x95, 0x62, 0xb6, 0x09, 0x52, 0x6e, 0xa4, 0x87, 0xfa, 0x99, 0xa7, 0xc1, 0x62, 0x02, 0x65, 0xff, 0x79, 0xa0, 0x7e, 0x23, 0x8e, 0xab, 0x69, 0x0f, 0xcd, 0xb9, 0xca, 0xcb, 0xdd, 0xd5, 0x50, 0x7d, 0xb0, 0xf9, 0x5e, 0x98, 0x3a, 0xfb, 0x3c, 0x9d, 0x9b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xba, 0x37, 0x25, 0xea, 0x44, 0x01, 0x00, 0x00, }
0
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal
rapidsai_public_repos/roc/vendor/google.golang.org/appengine/internal/base/api_base.proto
// Built-in base types for API calls. Primarily useful as return types. syntax = "proto2"; option go_package = "base"; package appengine.base; message StringProto { required string value = 1; } message Integer32Proto { required int32 value = 1; } message Integer64Proto { required int64 value = 1; } message BoolProto { required bool value = 1; } message DoubleProto { required double value = 1; } message BytesProto { required bytes value = 1 [ctype=CORD]; } message VoidProto { }
0
rapidsai_public_repos/roc/vendor/google.golang.org
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/AUTHORS
# This source code refers to The Go Authors for copyright purposes. # The master list of authors is in the main Go distribution, # visible at https://tip.golang.org/AUTHORS.
0
rapidsai_public_repos/roc/vendor/google.golang.org
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/PATENTS
Additional IP Rights Grant (Patents) "This implementation" means the copyrightable works distributed by Google as part of the Go project. Google hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, transfer and otherwise run, modify and propagate the contents of this implementation of Go, where such license applies only to those patent claims, both currently owned or controlled by Google and acquired in the future, licensable by Google that are necessarily infringed by this implementation of Go. This grant does not include claims that would be infringed only as a consequence of further modification of this implementation. If you or your agent or exclusive licensee institute or order or agree to the institution of patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that this implementation of Go or any code incorporated within this implementation of Go constitutes direct or contributory patent infringement, or inducement of patent infringement, then any patent rights granted to you under this License for this implementation of Go shall terminate as of the date such litigation is filed.
0
rapidsai_public_repos/roc/vendor/google.golang.org
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/LICENSE
Copyright (c) 2018 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.
0
rapidsai_public_repos/roc/vendor/google.golang.org
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/CONTRIBUTORS
# This source code was written by the Go contributors. # The master list of contributors is in the main Go distribution, # visible at https://tip.golang.org/CONTRIBUTORS.
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
// 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 protodesc import ( "fmt" "strings" "google.golang.org/protobuf/internal/encoding/defval" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" ) // ToFileDescriptorProto copies a protoreflect.FileDescriptor into a // google.protobuf.FileDescriptorProto message. func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileDescriptorProto { p := &descriptorpb.FileDescriptorProto{ Name: proto.String(file.Path()), Options: proto.Clone(file.Options()).(*descriptorpb.FileOptions), } if file.Package() != "" { p.Package = proto.String(string(file.Package())) } for i, imports := 0, file.Imports(); i < imports.Len(); i++ { imp := imports.Get(i) p.Dependency = append(p.Dependency, imp.Path()) if imp.IsPublic { p.PublicDependency = append(p.PublicDependency, int32(i)) } if imp.IsWeak { p.WeakDependency = append(p.WeakDependency, int32(i)) } } for i, locs := 0, file.SourceLocations(); i < locs.Len(); i++ { loc := locs.Get(i) l := &descriptorpb.SourceCodeInfo_Location{} l.Path = append(l.Path, loc.Path...) if loc.StartLine == loc.EndLine { l.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndColumn)} } else { l.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndLine), int32(loc.EndColumn)} } l.LeadingDetachedComments = append([]string(nil), loc.LeadingDetachedComments...) if loc.LeadingComments != "" { l.LeadingComments = proto.String(loc.LeadingComments) } if loc.TrailingComments != "" { l.TrailingComments = proto.String(loc.TrailingComments) } if p.SourceCodeInfo == nil { p.SourceCodeInfo = &descriptorpb.SourceCodeInfo{} } p.SourceCodeInfo.Location = append(p.SourceCodeInfo.Location, l) } for i, messages := 0, file.Messages(); i < messages.Len(); i++ { p.MessageType = append(p.MessageType, ToDescriptorProto(messages.Get(i))) } for i, enums := 0, file.Enums(); i < enums.Len(); i++ { p.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i))) } for i, services := 0, file.Services(); i < services.Len(); i++ { p.Service = append(p.Service, ToServiceDescriptorProto(services.Get(i))) } for i, exts := 0, file.Extensions(); i < exts.Len(); i++ { p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i))) } if syntax := file.Syntax(); syntax != protoreflect.Proto2 { p.Syntax = proto.String(file.Syntax().String()) } return p } // ToDescriptorProto copies a protoreflect.MessageDescriptor into a // google.protobuf.DescriptorProto message. func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto { p := &descriptorpb.DescriptorProto{ Name: proto.String(string(message.Name())), Options: proto.Clone(message.Options()).(*descriptorpb.MessageOptions), } for i, fields := 0, message.Fields(); i < fields.Len(); i++ { p.Field = append(p.Field, ToFieldDescriptorProto(fields.Get(i))) } for i, exts := 0, message.Extensions(); i < exts.Len(); i++ { p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i))) } for i, messages := 0, message.Messages(); i < messages.Len(); i++ { p.NestedType = append(p.NestedType, ToDescriptorProto(messages.Get(i))) } for i, enums := 0, message.Enums(); i < enums.Len(); i++ { p.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i))) } for i, xranges := 0, message.ExtensionRanges(); i < xranges.Len(); i++ { xrange := xranges.Get(i) p.ExtensionRange = append(p.ExtensionRange, &descriptorpb.DescriptorProto_ExtensionRange{ Start: proto.Int32(int32(xrange[0])), End: proto.Int32(int32(xrange[1])), Options: proto.Clone(message.ExtensionRangeOptions(i)).(*descriptorpb.ExtensionRangeOptions), }) } for i, oneofs := 0, message.Oneofs(); i < oneofs.Len(); i++ { p.OneofDecl = append(p.OneofDecl, ToOneofDescriptorProto(oneofs.Get(i))) } for i, ranges := 0, message.ReservedRanges(); i < ranges.Len(); i++ { rrange := ranges.Get(i) p.ReservedRange = append(p.ReservedRange, &descriptorpb.DescriptorProto_ReservedRange{ Start: proto.Int32(int32(rrange[0])), End: proto.Int32(int32(rrange[1])), }) } for i, names := 0, message.ReservedNames(); i < names.Len(); i++ { p.ReservedName = append(p.ReservedName, string(names.Get(i))) } return p } // ToFieldDescriptorProto copies a protoreflect.FieldDescriptor into a // google.protobuf.FieldDescriptorProto message. func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.FieldDescriptorProto { p := &descriptorpb.FieldDescriptorProto{ Name: proto.String(string(field.Name())), Number: proto.Int32(int32(field.Number())), Label: descriptorpb.FieldDescriptorProto_Label(field.Cardinality()).Enum(), Options: proto.Clone(field.Options()).(*descriptorpb.FieldOptions), } if field.IsExtension() { p.Extendee = fullNameOf(field.ContainingMessage()) } if field.Kind().IsValid() { p.Type = descriptorpb.FieldDescriptorProto_Type(field.Kind()).Enum() } if field.Enum() != nil { p.TypeName = fullNameOf(field.Enum()) } if field.Message() != nil { p.TypeName = fullNameOf(field.Message()) } if field.HasJSONName() { // A bug in older versions of protoc would always populate the // "json_name" option for extensions when it is meaningless. // When it did so, it would always use the camel-cased field name. if field.IsExtension() { p.JsonName = proto.String(strs.JSONCamelCase(string(field.Name()))) } else { p.JsonName = proto.String(field.JSONName()) } } if field.Syntax() == protoreflect.Proto3 && field.HasOptionalKeyword() { p.Proto3Optional = proto.Bool(true) } if field.HasDefault() { def, err := defval.Marshal(field.Default(), field.DefaultEnumValue(), field.Kind(), defval.Descriptor) if err != nil && field.DefaultEnumValue() != nil { def = string(field.DefaultEnumValue().Name()) // occurs for unresolved enum values } else if err != nil { panic(fmt.Sprintf("%v: %v", field.FullName(), err)) } p.DefaultValue = proto.String(def) } if oneof := field.ContainingOneof(); oneof != nil { p.OneofIndex = proto.Int32(int32(oneof.Index())) } return p } // ToOneofDescriptorProto copies a protoreflect.OneofDescriptor into a // google.protobuf.OneofDescriptorProto message. func ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.OneofDescriptorProto { return &descriptorpb.OneofDescriptorProto{ Name: proto.String(string(oneof.Name())), Options: proto.Clone(oneof.Options()).(*descriptorpb.OneofOptions), } } // ToEnumDescriptorProto copies a protoreflect.EnumDescriptor into a // google.protobuf.EnumDescriptorProto message. func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumDescriptorProto { p := &descriptorpb.EnumDescriptorProto{ Name: proto.String(string(enum.Name())), Options: proto.Clone(enum.Options()).(*descriptorpb.EnumOptions), } for i, values := 0, enum.Values(); i < values.Len(); i++ { p.Value = append(p.Value, ToEnumValueDescriptorProto(values.Get(i))) } for i, ranges := 0, enum.ReservedRanges(); i < ranges.Len(); i++ { rrange := ranges.Get(i) p.ReservedRange = append(p.ReservedRange, &descriptorpb.EnumDescriptorProto_EnumReservedRange{ Start: proto.Int32(int32(rrange[0])), End: proto.Int32(int32(rrange[1])), }) } for i, names := 0, enum.ReservedNames(); i < names.Len(); i++ { p.ReservedName = append(p.ReservedName, string(names.Get(i))) } return p } // ToEnumValueDescriptorProto copies a protoreflect.EnumValueDescriptor into a // google.protobuf.EnumValueDescriptorProto message. func ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto { return &descriptorpb.EnumValueDescriptorProto{ Name: proto.String(string(value.Name())), Number: proto.Int32(int32(value.Number())), Options: proto.Clone(value.Options()).(*descriptorpb.EnumValueOptions), } } // ToServiceDescriptorProto copies a protoreflect.ServiceDescriptor into a // google.protobuf.ServiceDescriptorProto message. func ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descriptorpb.ServiceDescriptorProto { p := &descriptorpb.ServiceDescriptorProto{ Name: proto.String(string(service.Name())), Options: proto.Clone(service.Options()).(*descriptorpb.ServiceOptions), } for i, methods := 0, service.Methods(); i < methods.Len(); i++ { p.Method = append(p.Method, ToMethodDescriptorProto(methods.Get(i))) } return p } // ToMethodDescriptorProto copies a protoreflect.MethodDescriptor into a // google.protobuf.MethodDescriptorProto message. func ToMethodDescriptorProto(method protoreflect.MethodDescriptor) *descriptorpb.MethodDescriptorProto { p := &descriptorpb.MethodDescriptorProto{ Name: proto.String(string(method.Name())), InputType: fullNameOf(method.Input()), OutputType: fullNameOf(method.Output()), Options: proto.Clone(method.Options()).(*descriptorpb.MethodOptions), } if method.IsStreamingClient() { p.ClientStreaming = proto.Bool(true) } if method.IsStreamingServer() { p.ServerStreaming = proto.Bool(true) } return p } func fullNameOf(d protoreflect.Descriptor) *string { if d == nil { return nil } if strings.HasPrefix(string(d.FullName()), unknownPrefix) { return proto.String(string(d.FullName()[len(unknownPrefix):])) } return proto.String("." + string(d.FullName())) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
// 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 protodesc provides functionality for converting // FileDescriptorProto messages to/from protoreflect.FileDescriptor values. // // The google.protobuf.FileDescriptorProto is a protobuf message that describes // the type information for a .proto file in a form that is easily serializable. // The protoreflect.FileDescriptor is a more structured representation of // the FileDescriptorProto message where references and remote dependencies // can be directly followed. package protodesc import ( "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/descriptorpb" ) // Resolver is the resolver used by NewFile to resolve dependencies. // The enums and messages provided must belong to some parent file, // which is also registered. // // It is implemented by protoregistry.Files. type Resolver interface { FindFileByPath(string) (protoreflect.FileDescriptor, error) FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) } // FileOptions configures the construction of file descriptors. type FileOptions struct { pragma.NoUnkeyedLiterals // AllowUnresolvable configures New to permissively allow unresolvable // file, enum, or message dependencies. Unresolved dependencies are replaced // by placeholder equivalents. // // The following dependencies may be left unresolved: // • Resolving an imported file. // • Resolving the type for a message field or extension field. // If the kind of the field is unknown, then a placeholder is used for both // the Enum and Message accessors on the protoreflect.FieldDescriptor. // • Resolving an enum value set as the default for an optional enum field. // If unresolvable, the protoreflect.FieldDescriptor.Default is set to the // first value in the associated enum (or zero if the also enum dependency // is also unresolvable). The protoreflect.FieldDescriptor.DefaultEnumValue // is populated with a placeholder. // • Resolving the extended message type for an extension field. // • Resolving the input or output message type for a service method. // // If the unresolved dependency uses a relative name, // then the placeholder will contain an invalid FullName with a "*." prefix, // indicating that the starting prefix of the full name is unknown. AllowUnresolvable bool } // NewFile creates a new protoreflect.FileDescriptor from the provided // file descriptor message. See FileOptions.New for more information. func NewFile(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) { return FileOptions{}.New(fd, r) } // NewFiles creates a new protoregistry.Files from the provided // FileDescriptorSet message. See FileOptions.NewFiles for more information. func NewFiles(fd *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) { return FileOptions{}.NewFiles(fd) } // New creates a new protoreflect.FileDescriptor from the provided // file descriptor message. The file must represent a valid proto file according // to protobuf semantics. The returned descriptor is a deep copy of the input. // // Any imported files, enum types, or message types referenced in the file are // resolved using the provided registry. When looking up an import file path, // the path must be unique. The newly created file descriptor is not registered // back into the provided file registry. func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) { if r == nil { r = (*protoregistry.Files)(nil) // empty resolver } // Handle the file descriptor content. f := &filedesc.File{L2: &filedesc.FileL2{}} switch fd.GetSyntax() { case "proto2", "": f.L1.Syntax = protoreflect.Proto2 case "proto3": f.L1.Syntax = protoreflect.Proto3 default: return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) } f.L1.Path = fd.GetName() if f.L1.Path == "" { return nil, errors.New("file path must be populated") } f.L1.Package = protoreflect.FullName(fd.GetPackage()) if !f.L1.Package.IsValid() && f.L1.Package != "" { return nil, errors.New("invalid package: %q", f.L1.Package) } if opts := fd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FileOptions) f.L2.Options = func() protoreflect.ProtoMessage { return opts } } f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency())) for _, i := range fd.GetPublicDependency() { if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsPublic { return nil, errors.New("invalid or duplicate public import index: %d", i) } f.L2.Imports[i].IsPublic = true } for _, i := range fd.GetWeakDependency() { if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsWeak { return nil, errors.New("invalid or duplicate weak import index: %d", i) } f.L2.Imports[i].IsWeak = true } imps := importSet{f.Path(): true} for i, path := range fd.GetDependency() { imp := &f.L2.Imports[i] f, err := r.FindFileByPath(path) if err == protoregistry.NotFound && (o.AllowUnresolvable || imp.IsWeak) { f = filedesc.PlaceholderFile(path) } else if err != nil { return nil, errors.New("could not resolve import %q: %v", path, err) } imp.FileDescriptor = f if imps[imp.Path()] { return nil, errors.New("already imported %q", path) } imps[imp.Path()] = true } for i := range fd.GetDependency() { imp := &f.L2.Imports[i] imps.importPublic(imp.Imports()) } // Handle source locations. f.L2.Locations.File = f for _, loc := range fd.GetSourceCodeInfo().GetLocation() { var l protoreflect.SourceLocation // TODO: Validate that the path points to an actual declaration? l.Path = protoreflect.SourcePath(loc.GetPath()) s := loc.GetSpan() switch len(s) { case 3: l.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[0]), int(s[2]) case 4: l.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[2]), int(s[3]) default: return nil, errors.New("invalid span: %v", s) } // TODO: Validate that the span information is sensible? // See https://github.com/protocolbuffers/protobuf/issues/6378. if false && (l.EndLine < l.StartLine || l.StartLine < 0 || l.StartColumn < 0 || l.EndColumn < 0 || (l.StartLine == l.EndLine && l.EndColumn <= l.StartColumn)) { return nil, errors.New("invalid span: %v", s) } l.LeadingDetachedComments = loc.GetLeadingDetachedComments() l.LeadingComments = loc.GetLeadingComments() l.TrailingComments = loc.GetTrailingComments() f.L2.Locations.List = append(f.L2.Locations.List, l) } // Step 1: Allocate and derive the names for all declarations. // This copies all fields from the descriptor proto except: // google.protobuf.FieldDescriptorProto.type_name // google.protobuf.FieldDescriptorProto.default_value // google.protobuf.FieldDescriptorProto.oneof_index // google.protobuf.FieldDescriptorProto.extendee // google.protobuf.MethodDescriptorProto.input // google.protobuf.MethodDescriptorProto.output var err error sb := new(strs.Builder) r1 := make(descsByName) if f.L1.Enums.List, err = r1.initEnumDeclarations(fd.GetEnumType(), f, sb); err != nil { return nil, err } if f.L1.Messages.List, err = r1.initMessagesDeclarations(fd.GetMessageType(), f, sb); err != nil { return nil, err } if f.L1.Extensions.List, err = r1.initExtensionDeclarations(fd.GetExtension(), f, sb); err != nil { return nil, err } if f.L1.Services.List, err = r1.initServiceDeclarations(fd.GetService(), f, sb); err != nil { return nil, err } // Step 2: Resolve every dependency reference not handled by step 1. r2 := &resolver{local: r1, remote: r, imports: imps, allowUnresolvable: o.AllowUnresolvable} if err := r2.resolveMessageDependencies(f.L1.Messages.List, fd.GetMessageType()); err != nil { return nil, err } if err := r2.resolveExtensionDependencies(f.L1.Extensions.List, fd.GetExtension()); err != nil { return nil, err } if err := r2.resolveServiceDependencies(f.L1.Services.List, fd.GetService()); err != nil { return nil, err } // Step 3: Validate every enum, message, and extension declaration. if err := validateEnumDeclarations(f.L1.Enums.List, fd.GetEnumType()); err != nil { return nil, err } if err := validateMessageDeclarations(f.L1.Messages.List, fd.GetMessageType()); err != nil { return nil, err } if err := validateExtensionDeclarations(f.L1.Extensions.List, fd.GetExtension()); err != nil { return nil, err } return f, nil } type importSet map[string]bool func (is importSet) importPublic(imps protoreflect.FileImports) { for i := 0; i < imps.Len(); i++ { if imp := imps.Get(i); imp.IsPublic { is[imp.Path()] = true is.importPublic(imp.Imports()) } } } // NewFiles creates a new protoregistry.Files from the provided // FileDescriptorSet message. The descriptor set must include only // valid files according to protobuf semantics. The returned descriptors // are a deep copy of the input. func (o FileOptions) NewFiles(fds *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) { files := make(map[string]*descriptorpb.FileDescriptorProto) for _, fd := range fds.File { if _, ok := files[fd.GetName()]; ok { return nil, errors.New("file appears multiple times: %q", fd.GetName()) } files[fd.GetName()] = fd } r := &protoregistry.Files{} for _, fd := range files { if err := o.addFileDeps(r, fd, files); err != nil { return nil, err } } return r, nil } func (o FileOptions) addFileDeps(r *protoregistry.Files, fd *descriptorpb.FileDescriptorProto, files map[string]*descriptorpb.FileDescriptorProto) error { // Set the entry to nil while descending into a file's dependencies to detect cycles. files[fd.GetName()] = nil for _, dep := range fd.Dependency { depfd, ok := files[dep] if depfd == nil { if ok { return errors.New("import cycle in file: %q", dep) } continue } if err := o.addFileDeps(r, depfd, files); err != nil { return err } } // Delete the entry once dependencies are processed. delete(files, fd.GetName()) f, err := o.New(fd, r) if err != nil { return err } return r.RegisterFile(f) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go
// 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 protodesc import ( "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" ) type descsByName map[protoreflect.FullName]protoreflect.Descriptor func (r descsByName) initEnumDeclarations(eds []*descriptorpb.EnumDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (es []filedesc.Enum, err error) { es = make([]filedesc.Enum, len(eds)) // allocate up-front to ensure stable pointers for i, ed := range eds { e := &es[i] e.L2 = new(filedesc.EnumL2) if e.L0, err = r.makeBase(e, parent, ed.GetName(), i, sb); err != nil { return nil, err } if opts := ed.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.EnumOptions) e.L2.Options = func() protoreflect.ProtoMessage { return opts } } for _, s := range ed.GetReservedName() { e.L2.ReservedNames.List = append(e.L2.ReservedNames.List, protoreflect.Name(s)) } for _, rr := range ed.GetReservedRange() { e.L2.ReservedRanges.List = append(e.L2.ReservedRanges.List, [2]protoreflect.EnumNumber{ protoreflect.EnumNumber(rr.GetStart()), protoreflect.EnumNumber(rr.GetEnd()), }) } if e.L2.Values.List, err = r.initEnumValuesFromDescriptorProto(ed.GetValue(), e, sb); err != nil { return nil, err } } return es, nil } func (r descsByName) initEnumValuesFromDescriptorProto(vds []*descriptorpb.EnumValueDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (vs []filedesc.EnumValue, err error) { vs = make([]filedesc.EnumValue, len(vds)) // allocate up-front to ensure stable pointers for i, vd := range vds { v := &vs[i] if v.L0, err = r.makeBase(v, parent, vd.GetName(), i, sb); err != nil { return nil, err } if opts := vd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.EnumValueOptions) v.L1.Options = func() protoreflect.ProtoMessage { return opts } } v.L1.Number = protoreflect.EnumNumber(vd.GetNumber()) } return vs, nil } func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Message, err error) { ms = make([]filedesc.Message, len(mds)) // allocate up-front to ensure stable pointers for i, md := range mds { m := &ms[i] m.L2 = new(filedesc.MessageL2) if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { return nil, err } if opts := md.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.MessageOptions) m.L2.Options = func() protoreflect.ProtoMessage { return opts } m.L1.IsMapEntry = opts.GetMapEntry() m.L1.IsMessageSet = opts.GetMessageSetWireFormat() } for _, s := range md.GetReservedName() { m.L2.ReservedNames.List = append(m.L2.ReservedNames.List, protoreflect.Name(s)) } for _, rr := range md.GetReservedRange() { m.L2.ReservedRanges.List = append(m.L2.ReservedRanges.List, [2]protoreflect.FieldNumber{ protoreflect.FieldNumber(rr.GetStart()), protoreflect.FieldNumber(rr.GetEnd()), }) } for _, xr := range md.GetExtensionRange() { m.L2.ExtensionRanges.List = append(m.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{ protoreflect.FieldNumber(xr.GetStart()), protoreflect.FieldNumber(xr.GetEnd()), }) var optsFunc func() protoreflect.ProtoMessage if opts := xr.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.ExtensionRangeOptions) optsFunc = func() protoreflect.ProtoMessage { return opts } } m.L2.ExtensionRangeOptions = append(m.L2.ExtensionRangeOptions, optsFunc) } if m.L2.Fields.List, err = r.initFieldsFromDescriptorProto(md.GetField(), m, sb); err != nil { return nil, err } if m.L2.Oneofs.List, err = r.initOneofsFromDescriptorProto(md.GetOneofDecl(), m, sb); err != nil { return nil, err } if m.L1.Enums.List, err = r.initEnumDeclarations(md.GetEnumType(), m, sb); err != nil { return nil, err } if m.L1.Messages.List, err = r.initMessagesDeclarations(md.GetNestedType(), m, sb); err != nil { return nil, err } if m.L1.Extensions.List, err = r.initExtensionDeclarations(md.GetExtension(), m, sb); err != nil { return nil, err } } return ms, nil } func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (fs []filedesc.Field, err error) { fs = make([]filedesc.Field, len(fds)) // allocate up-front to ensure stable pointers for i, fd := range fds { f := &fs[i] if f.L0, err = r.makeBase(f, parent, fd.GetName(), i, sb); err != nil { return nil, err } f.L1.IsProto3Optional = fd.GetProto3Optional() if opts := fd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FieldOptions) f.L1.Options = func() protoreflect.ProtoMessage { return opts } f.L1.IsWeak = opts.GetWeak() f.L1.HasPacked = opts.Packed != nil f.L1.IsPacked = opts.GetPacked() } f.L1.Number = protoreflect.FieldNumber(fd.GetNumber()) f.L1.Cardinality = protoreflect.Cardinality(fd.GetLabel()) if fd.Type != nil { f.L1.Kind = protoreflect.Kind(fd.GetType()) } if fd.JsonName != nil { f.L1.StringName.InitJSON(fd.GetJsonName()) } } return fs, nil } func (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (os []filedesc.Oneof, err error) { os = make([]filedesc.Oneof, len(ods)) // allocate up-front to ensure stable pointers for i, od := range ods { o := &os[i] if o.L0, err = r.makeBase(o, parent, od.GetName(), i, sb); err != nil { return nil, err } if opts := od.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.OneofOptions) o.L1.Options = func() protoreflect.ProtoMessage { return opts } } } return os, nil } func (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (xs []filedesc.Extension, err error) { xs = make([]filedesc.Extension, len(xds)) // allocate up-front to ensure stable pointers for i, xd := range xds { x := &xs[i] x.L2 = new(filedesc.ExtensionL2) if x.L0, err = r.makeBase(x, parent, xd.GetName(), i, sb); err != nil { return nil, err } if opts := xd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FieldOptions) x.L2.Options = func() protoreflect.ProtoMessage { return opts } x.L2.IsPacked = opts.GetPacked() } x.L1.Number = protoreflect.FieldNumber(xd.GetNumber()) x.L1.Cardinality = protoreflect.Cardinality(xd.GetLabel()) if xd.Type != nil { x.L1.Kind = protoreflect.Kind(xd.GetType()) } if xd.JsonName != nil { x.L2.StringName.InitJSON(xd.GetJsonName()) } } return xs, nil } func (r descsByName) initServiceDeclarations(sds []*descriptorpb.ServiceDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ss []filedesc.Service, err error) { ss = make([]filedesc.Service, len(sds)) // allocate up-front to ensure stable pointers for i, sd := range sds { s := &ss[i] s.L2 = new(filedesc.ServiceL2) if s.L0, err = r.makeBase(s, parent, sd.GetName(), i, sb); err != nil { return nil, err } if opts := sd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.ServiceOptions) s.L2.Options = func() protoreflect.ProtoMessage { return opts } } if s.L2.Methods.List, err = r.initMethodsFromDescriptorProto(sd.GetMethod(), s, sb); err != nil { return nil, err } } return ss, nil } func (r descsByName) initMethodsFromDescriptorProto(mds []*descriptorpb.MethodDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Method, err error) { ms = make([]filedesc.Method, len(mds)) // allocate up-front to ensure stable pointers for i, md := range mds { m := &ms[i] if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { return nil, err } if opts := md.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.MethodOptions) m.L1.Options = func() protoreflect.ProtoMessage { return opts } } m.L1.IsStreamingClient = md.GetClientStreaming() m.L1.IsStreamingServer = md.GetServerStreaming() } return ms, nil } func (r descsByName) makeBase(child, parent protoreflect.Descriptor, name string, idx int, sb *strs.Builder) (filedesc.BaseL0, error) { if !protoreflect.Name(name).IsValid() { return filedesc.BaseL0{}, errors.New("descriptor %q has an invalid nested name: %q", parent.FullName(), name) } // Derive the full name of the child. // Note that enum values are a sibling to the enum parent in the namespace. var fullName protoreflect.FullName if _, ok := parent.(protoreflect.EnumDescriptor); ok { fullName = sb.AppendFullName(parent.FullName().Parent(), protoreflect.Name(name)) } else { fullName = sb.AppendFullName(parent.FullName(), protoreflect.Name(name)) } if _, ok := r[fullName]; ok { return filedesc.BaseL0{}, errors.New("descriptor %q already declared", fullName) } r[fullName] = child // TODO: Verify that the full name does not already exist in the resolver? // This is not as critical since most usages of NewFile will register // the created file back into the registry, which will perform this check. return filedesc.BaseL0{ FullName: fullName, ParentFile: parent.ParentFile().(*filedesc.File), Parent: parent, Index: idx, }, nil }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
// 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 protodesc import ( "google.golang.org/protobuf/internal/encoding/defval" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/descriptorpb" ) // resolver is a wrapper around a local registry of declarations within the file // and the remote resolver. The remote resolver is restricted to only return // descriptors that have been imported. type resolver struct { local descsByName remote Resolver imports importSet allowUnresolvable bool } func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) (err error) { for i, md := range mds { m := &ms[i] for j, fd := range md.GetField() { f := &m.L2.Fields.List[j] if f.L1.Cardinality == protoreflect.Required { m.L2.RequiredNumbers.List = append(m.L2.RequiredNumbers.List, f.L1.Number) } if fd.OneofIndex != nil { k := int(fd.GetOneofIndex()) if !(0 <= k && k < len(md.GetOneofDecl())) { return errors.New("message field %q has an invalid oneof index: %d", f.FullName(), k) } o := &m.L2.Oneofs.List[k] f.L1.ContainingOneof = o o.L1.Fields.List = append(o.L1.Fields.List, f) } if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) } if fd.DefaultValue != nil { v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable) if err != nil { return errors.New("message field %q has invalid default: %v", f.FullName(), err) } f.L1.Default = filedesc.DefaultValue(v, ev) } } if err := r.resolveMessageDependencies(m.L1.Messages.List, md.GetNestedType()); err != nil { return err } if err := r.resolveExtensionDependencies(m.L1.Extensions.List, md.GetExtension()); err != nil { return err } } return nil } func (r *resolver) resolveExtensionDependencies(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) (err error) { for i, xd := range xds { x := &xs[i] if x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee()), false); err != nil { return errors.New("extension field %q cannot resolve extendee: %v", x.FullName(), err) } if x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName()), false); err != nil { return errors.New("extension field %q cannot resolve type: %v", x.FullName(), err) } if xd.DefaultValue != nil { v, ev, err := unmarshalDefault(xd.GetDefaultValue(), x, r.allowUnresolvable) if err != nil { return errors.New("extension field %q has invalid default: %v", x.FullName(), err) } x.L2.Default = filedesc.DefaultValue(v, ev) } } return nil } func (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*descriptorpb.ServiceDescriptorProto) (err error) { for i, sd := range sds { s := &ss[i] for j, md := range sd.GetMethod() { m := &s.L2.Methods.List[j] m.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType()), false) if err != nil { return errors.New("service method %q cannot resolve input: %v", m.FullName(), err) } m.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType()), false) if err != nil { return errors.New("service method %q cannot resolve output: %v", m.FullName(), err) } } } return nil } // findTarget finds an enum or message descriptor if k is an enum, message, // group, or unknown. If unknown, and the name could be resolved, the kind // returned kind is set based on the type of the resolved descriptor. func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) { switch k { case protoreflect.EnumKind: ed, err := r.findEnumDescriptor(scope, ref, isWeak) if err != nil { return 0, nil, nil, err } return k, ed, nil, nil case protoreflect.MessageKind, protoreflect.GroupKind: md, err := r.findMessageDescriptor(scope, ref, isWeak) if err != nil { return 0, nil, nil, err } return k, nil, md, nil case 0: // Handle unspecified kinds (possible with parsers that operate // on a per-file basis without knowledge of dependencies). d, err := r.findDescriptor(scope, ref) if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { return k, filedesc.PlaceholderEnum(ref.FullName()), filedesc.PlaceholderMessage(ref.FullName()), nil } else if err == protoregistry.NotFound { return 0, nil, nil, errors.New("%q not found", ref.FullName()) } else if err != nil { return 0, nil, nil, err } switch d := d.(type) { case protoreflect.EnumDescriptor: return protoreflect.EnumKind, d, nil, nil case protoreflect.MessageDescriptor: return protoreflect.MessageKind, nil, d, nil default: return 0, nil, nil, errors.New("unknown kind") } default: if ref != "" { return 0, nil, nil, errors.New("target name cannot be specified for %v", k) } if !k.IsValid() { return 0, nil, nil, errors.New("invalid kind: %d", k) } return k, nil, nil, nil } } // findDescriptor finds the descriptor by name, // which may be a relative name within some scope. // // Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar", // then the following full names are searched: // * fizz.buzz.Foo.Bar // * fizz.Foo.Bar // * Foo.Bar func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) { if !ref.IsValid() { return nil, errors.New("invalid name reference: %q", ref) } if ref.IsFull() { scope, ref = "", ref[1:] } var foundButNotImported protoreflect.Descriptor for { // Derive the full name to search. s := protoreflect.FullName(ref) if scope != "" { s = scope + "." + s } // Check the current file for the descriptor. if d, ok := r.local[s]; ok { return d, nil } // Check the remote registry for the descriptor. d, err := r.remote.FindDescriptorByName(s) if err == nil { // Only allow descriptors covered by one of the imports. if r.imports[d.ParentFile().Path()] { return d, nil } foundButNotImported = d } else if err != protoregistry.NotFound { return nil, errors.Wrap(err, "%q", s) } // Continue on at a higher level of scoping. if scope == "" { if d := foundButNotImported; d != nil { return nil, errors.New("resolved %q, but %q is not imported", d.FullName(), d.ParentFile().Path()) } return nil, protoregistry.NotFound } scope = scope.Parent() } } func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.EnumDescriptor, error) { d, err := r.findDescriptor(scope, ref) if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { return filedesc.PlaceholderEnum(ref.FullName()), nil } else if err == protoregistry.NotFound { return nil, errors.New("%q not found", ref.FullName()) } else if err != nil { return nil, err } ed, ok := d.(protoreflect.EnumDescriptor) if !ok { return nil, errors.New("resolved %q, but it is not an enum", d.FullName()) } return ed, nil } func (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.MessageDescriptor, error) { d, err := r.findDescriptor(scope, ref) if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { return filedesc.PlaceholderMessage(ref.FullName()), nil } else if err == protoregistry.NotFound { return nil, errors.New("%q not found", ref.FullName()) } else if err != nil { return nil, err } md, ok := d.(protoreflect.MessageDescriptor) if !ok { return nil, errors.New("resolved %q, but it is not an message", d.FullName()) } return md, nil } // partialName is the partial name. A leading dot means that the name is full, // otherwise the name is relative to some current scope. // See google.protobuf.FieldDescriptorProto.type_name. type partialName string func (s partialName) IsFull() bool { return len(s) > 0 && s[0] == '.' } func (s partialName) IsValid() bool { if s.IsFull() { return protoreflect.FullName(s[1:]).IsValid() } return protoreflect.FullName(s).IsValid() } const unknownPrefix = "*." // FullName converts the partial name to a full name on a best-effort basis. // If relative, it creates an invalid full name, using a "*." prefix // to indicate that the start of the full name is unknown. func (s partialName) FullName() protoreflect.FullName { if s.IsFull() { return protoreflect.FullName(s[1:]) } return protoreflect.FullName(unknownPrefix + s) } func unmarshalDefault(s string, fd protoreflect.FieldDescriptor, allowUnresolvable bool) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) { var evs protoreflect.EnumValueDescriptors if fd.Enum() != nil { evs = fd.Enum().Values() } v, ev, err := defval.Unmarshal(s, fd.Kind(), evs, defval.Descriptor) if err != nil && allowUnresolvable && evs != nil && protoreflect.Name(s).IsValid() { v = protoreflect.ValueOfEnum(0) if evs.Len() > 0 { v = protoreflect.ValueOfEnum(evs.Get(0).Number()) } ev = filedesc.PlaceholderEnumValue(fd.Enum().FullName().Parent().Append(protoreflect.Name(s))) } else if err != nil { return v, ev, err } if fd.Syntax() == protoreflect.Proto3 { return v, ev, errors.New("cannot be specified under proto3 semantics") } if fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind || fd.Cardinality() == protoreflect.Repeated { return v, ev, errors.New("cannot be specified on composite types") } return v, ev, nil }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
// 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 protodesc import ( "strings" "unicode" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" ) func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescriptorProto) error { for i, ed := range eds { e := &es[i] if err := e.L2.ReservedNames.CheckValid(); err != nil { return errors.New("enum %q reserved names has %v", e.FullName(), err) } if err := e.L2.ReservedRanges.CheckValid(); err != nil { return errors.New("enum %q reserved ranges has %v", e.FullName(), err) } if len(ed.GetValue()) == 0 { return errors.New("enum %q must contain at least one value declaration", e.FullName()) } allowAlias := ed.GetOptions().GetAllowAlias() foundAlias := false for i := 0; i < e.Values().Len(); i++ { v1 := e.Values().Get(i) if v2 := e.Values().ByNumber(v1.Number()); v1 != v2 { foundAlias = true if !allowAlias { return errors.New("enum %q has conflicting non-aliased values on number %d: %q with %q", e.FullName(), v1.Number(), v1.Name(), v2.Name()) } } } if allowAlias && !foundAlias { return errors.New("enum %q allows aliases, but none were found", e.FullName()) } if e.Syntax() == protoreflect.Proto3 { if v := e.Values().Get(0); v.Number() != 0 { return errors.New("enum %q using proto3 semantics must have zero number for the first value", v.FullName()) } // Verify that value names in proto3 do not conflict if the // case-insensitive prefix is removed. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:4991-5055 names := map[string]protoreflect.EnumValueDescriptor{} prefix := strings.Replace(strings.ToLower(string(e.Name())), "_", "", -1) for i := 0; i < e.Values().Len(); i++ { v1 := e.Values().Get(i) s := strs.EnumValueName(strs.TrimEnumPrefix(string(v1.Name()), prefix)) if v2, ok := names[s]; ok && v1.Number() != v2.Number() { return errors.New("enum %q using proto3 semantics has conflict: %q with %q", e.FullName(), v1.Name(), v2.Name()) } names[s] = v1 } } for j, vd := range ed.GetValue() { v := &e.L2.Values.List[j] if vd.Number == nil { return errors.New("enum value %q must have a specified number", v.FullName()) } if e.L2.ReservedNames.Has(v.Name()) { return errors.New("enum value %q must not use reserved name", v.FullName()) } if e.L2.ReservedRanges.Has(v.Number()) { return errors.New("enum value %q must not use reserved number %d", v.FullName(), v.Number()) } } } return nil } func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error { for i, md := range mds { m := &ms[i] // Handle the message descriptor itself. isMessageSet := md.GetOptions().GetMessageSetWireFormat() if err := m.L2.ReservedNames.CheckValid(); err != nil { return errors.New("message %q reserved names has %v", m.FullName(), err) } if err := m.L2.ReservedRanges.CheckValid(isMessageSet); err != nil { return errors.New("message %q reserved ranges has %v", m.FullName(), err) } if err := m.L2.ExtensionRanges.CheckValid(isMessageSet); err != nil { return errors.New("message %q extension ranges has %v", m.FullName(), err) } if err := (*filedesc.FieldRanges).CheckOverlap(&m.L2.ReservedRanges, &m.L2.ExtensionRanges); err != nil { return errors.New("message %q reserved and extension ranges has %v", m.FullName(), err) } for i := 0; i < m.Fields().Len(); i++ { f1 := m.Fields().Get(i) if f2 := m.Fields().ByNumber(f1.Number()); f1 != f2 { return errors.New("message %q has conflicting fields: %q with %q", m.FullName(), f1.Name(), f2.Name()) } } if isMessageSet && !flags.ProtoLegacy { return errors.New("message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported", m.FullName()) } if isMessageSet && (m.Syntax() != protoreflect.Proto2 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { return errors.New("message %q is an invalid proto1 MessageSet", m.FullName()) } if m.Syntax() == protoreflect.Proto3 { if m.ExtensionRanges().Len() > 0 { return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) } // Verify that field names in proto3 do not conflict if lowercased // with all underscores removed. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847 names := map[string]protoreflect.FieldDescriptor{} for i := 0; i < m.Fields().Len(); i++ { f1 := m.Fields().Get(i) s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1) if f2, ok := names[s]; ok { return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name()) } names[s] = f1 } } for j, fd := range md.GetField() { f := &m.L2.Fields.List[j] if m.L2.ReservedNames.Has(f.Name()) { return errors.New("message field %q must not use reserved name", f.FullName()) } if !f.Number().IsValid() { return errors.New("message field %q has an invalid number: %d", f.FullName(), f.Number()) } if !f.Cardinality().IsValid() { return errors.New("message field %q has an invalid cardinality: %d", f.FullName(), f.Cardinality()) } if m.L2.ReservedRanges.Has(f.Number()) { return errors.New("message field %q must not use reserved number %d", f.FullName(), f.Number()) } if m.L2.ExtensionRanges.Has(f.Number()) { return errors.New("message field %q with number %d in extension range", f.FullName(), f.Number()) } if fd.Extendee != nil { return errors.New("message field %q may not have extendee: %q", f.FullName(), fd.GetExtendee()) } if f.L1.IsProto3Optional { if f.Syntax() != protoreflect.Proto3 { return errors.New("message field %q under proto3 optional semantics must be specified in the proto3 syntax", f.FullName()) } if f.Cardinality() != protoreflect.Optional { return errors.New("message field %q under proto3 optional semantics must have optional cardinality", f.FullName()) } if f.ContainingOneof() != nil && f.ContainingOneof().Fields().Len() != 1 { return errors.New("message field %q under proto3 optional semantics must be within a single element oneof", f.FullName()) } } if f.IsWeak() && !flags.ProtoLegacy { return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName()) } if f.IsWeak() && (f.Syntax() != protoreflect.Proto2 || !isOptionalMessage(f) || f.ContainingOneof() != nil) { return errors.New("message field %q may only be weak for an optional message", f.FullName()) } if f.IsPacked() && !isPackable(f) { return errors.New("message field %q is not packable", f.FullName()) } if err := checkValidGroup(f); err != nil { return errors.New("message field %q is an invalid group: %v", f.FullName(), err) } if err := checkValidMap(f); err != nil { return errors.New("message field %q is an invalid map: %v", f.FullName(), err) } if f.Syntax() == protoreflect.Proto3 { if f.Cardinality() == protoreflect.Required { return errors.New("message field %q using proto3 semantics cannot be required", f.FullName()) } if f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().Syntax() != protoreflect.Proto3 { return errors.New("message field %q using proto3 semantics may only depend on a proto3 enum", f.FullName()) } } } seenSynthetic := false // synthetic oneofs for proto3 optional must come after real oneofs for j := range md.GetOneofDecl() { o := &m.L2.Oneofs.List[j] if o.Fields().Len() == 0 { return errors.New("message oneof %q must contain at least one field declaration", o.FullName()) } if n := o.Fields().Len(); n-1 != (o.Fields().Get(n-1).Index() - o.Fields().Get(0).Index()) { return errors.New("message oneof %q must have consecutively declared fields", o.FullName()) } if o.IsSynthetic() { seenSynthetic = true continue } if !o.IsSynthetic() && seenSynthetic { return errors.New("message oneof %q must be declared before synthetic oneofs", o.FullName()) } for i := 0; i < o.Fields().Len(); i++ { f := o.Fields().Get(i) if f.Cardinality() != protoreflect.Optional { return errors.New("message field %q belongs in a oneof and must be optional", f.FullName()) } if f.IsWeak() { return errors.New("message field %q belongs in a oneof and must not be a weak reference", f.FullName()) } } } if err := validateEnumDeclarations(m.L1.Enums.List, md.GetEnumType()); err != nil { return err } if err := validateMessageDeclarations(m.L1.Messages.List, md.GetNestedType()); err != nil { return err } if err := validateExtensionDeclarations(m.L1.Extensions.List, md.GetExtension()); err != nil { return err } } return nil } func validateExtensionDeclarations(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error { for i, xd := range xds { x := &xs[i] // NOTE: Avoid using the IsValid method since extensions to MessageSet // may have a field number higher than normal. This check only verifies // that the number is not negative or reserved. We check again later // if we know that the extendee is definitely not a MessageSet. if n := x.Number(); n < 0 || (protowire.FirstReservedNumber <= n && n <= protowire.LastReservedNumber) { return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number()) } if !x.Cardinality().IsValid() || x.Cardinality() == protoreflect.Required { return errors.New("extension field %q has an invalid cardinality: %d", x.FullName(), x.Cardinality()) } if xd.JsonName != nil { // A bug in older versions of protoc would always populate the // "json_name" option for extensions when it is meaningless. // When it did so, it would always use the camel-cased field name. if xd.GetJsonName() != strs.JSONCamelCase(string(x.Name())) { return errors.New("extension field %q may not have an explicitly set JSON name: %q", x.FullName(), xd.GetJsonName()) } } if xd.OneofIndex != nil { return errors.New("extension field %q may not be part of a oneof", x.FullName()) } if md := x.ContainingMessage(); !md.IsPlaceholder() { if !md.ExtensionRanges().Has(x.Number()) { return errors.New("extension field %q extends %q with non-extension field number: %d", x.FullName(), md.FullName(), x.Number()) } isMessageSet := md.Options().(*descriptorpb.MessageOptions).GetMessageSetWireFormat() if isMessageSet && !isOptionalMessage(x) { return errors.New("extension field %q extends MessageSet and must be an optional message", x.FullName()) } if !isMessageSet && !x.Number().IsValid() { return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number()) } } if xd.GetOptions().GetWeak() { return errors.New("extension field %q cannot be a weak reference", x.FullName()) } if x.IsPacked() && !isPackable(x) { return errors.New("extension field %q is not packable", x.FullName()) } if err := checkValidGroup(x); err != nil { return errors.New("extension field %q is an invalid group: %v", x.FullName(), err) } if md := x.Message(); md != nil && md.IsMapEntry() { return errors.New("extension field %q cannot be a map entry", x.FullName()) } if x.Syntax() == protoreflect.Proto3 { switch x.ContainingMessage().FullName() { case (*descriptorpb.FileOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.EnumOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.EnumValueOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.MessageOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.FieldOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.OneofOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.ExtensionRangeOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.ServiceOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.MethodOptions)(nil).ProtoReflect().Descriptor().FullName(): default: return errors.New("extension field %q cannot be declared in proto3 unless extended descriptor options", x.FullName()) } } } return nil } // isOptionalMessage reports whether this is an optional message. // If the kind is unknown, it is assumed to be a message. func isOptionalMessage(fd protoreflect.FieldDescriptor) bool { return (fd.Kind() == 0 || fd.Kind() == protoreflect.MessageKind) && fd.Cardinality() == protoreflect.Optional } // isPackable checks whether the pack option can be specified. func isPackable(fd protoreflect.FieldDescriptor) bool { switch fd.Kind() { case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: return false } return fd.IsList() } // checkValidGroup reports whether fd is a valid group according to the same // rules that protoc imposes. func checkValidGroup(fd protoreflect.FieldDescriptor) error { md := fd.Message() switch { case fd.Kind() != protoreflect.GroupKind: return nil case fd.Syntax() != protoreflect.Proto2: return errors.New("invalid under proto2 semantics") case md == nil || md.IsPlaceholder(): return errors.New("message must be resolvable") case fd.FullName().Parent() != md.FullName().Parent(): return errors.New("message and field must be declared in the same scope") case !unicode.IsUpper(rune(md.Name()[0])): return errors.New("message name must start with an uppercase") case fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))): return errors.New("field name must be lowercased form of the message name") } return nil } // checkValidMap checks whether the field is a valid map according to the same // rules that protoc imposes. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:6045-6115 func checkValidMap(fd protoreflect.FieldDescriptor) error { md := fd.Message() switch { case md == nil || !md.IsMapEntry(): return nil case fd.FullName().Parent() != md.FullName().Parent(): return errors.New("message and field must be declared in the same scope") case md.Name() != protoreflect.Name(strs.MapEntryName(string(fd.Name()))): return errors.New("incorrect implicit map entry name") case fd.Cardinality() != protoreflect.Repeated: return errors.New("field must be repeated") case md.Fields().Len() != 2: return errors.New("message must have exactly two fields") case md.ExtensionRanges().Len() > 0: return errors.New("message must not have any extension ranges") case md.Enums().Len()+md.Messages().Len()+md.Extensions().Len() > 0: return errors.New("message must not have any nested declarations") } kf := md.Fields().Get(0) vf := md.Fields().Get(1) switch { case kf.Name() != genid.MapEntry_Key_field_name || kf.Number() != genid.MapEntry_Key_field_number || kf.Cardinality() != protoreflect.Optional || kf.ContainingOneof() != nil || kf.HasDefault(): return errors.New("invalid key field") case vf.Name() != genid.MapEntry_Value_field_name || vf.Number() != genid.MapEntry_Value_field_number || vf.Cardinality() != protoreflect.Optional || vf.ContainingOneof() != nil || vf.HasDefault(): return errors.New("invalid value field") } switch kf.Kind() { case protoreflect.BoolKind: // bool case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: // int32 case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: // int64 case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: // uint32 case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: // uint64 case protoreflect.StringKind: // string default: return errors.New("invalid key kind: %v", kf.Kind()) } if e := vf.Enum(); e != nil && e.Values().Len() > 0 && e.Values().Get(0).Number() != 0 { return errors.New("map enum value must have zero number for the first value") } return nil }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
// 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 protoregistry provides data structures to register and lookup // protobuf descriptor types. // // The Files registry contains file descriptors and provides the ability // to iterate over the files or lookup a specific descriptor within the files. // Files only contains protobuf descriptors and has no understanding of Go // type information that may be associated with each descriptor. // // The Types registry contains descriptor types for which there is a known // Go type associated with that descriptor. It provides the ability to iterate // over the registered types or lookup a type by name. package protoregistry import ( "fmt" "os" "strings" "sync" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/reflect/protoreflect" ) // conflictPolicy configures the policy for handling registration conflicts. // // It can be over-written at compile time with a linker-initialized variable: // go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn" // // It can be over-written at program execution with an environment variable: // GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main // // Neither of the above are covered by the compatibility promise and // may be removed in a future release of this module. var conflictPolicy = "panic" // "panic" | "warn" | "ignore" // ignoreConflict reports whether to ignore a registration conflict // given the descriptor being registered and the error. // It is a variable so that the behavior is easily overridden in another file. var ignoreConflict = func(d protoreflect.Descriptor, err error) bool { const env = "GOLANG_PROTOBUF_REGISTRATION_CONFLICT" const faq = "https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict" policy := conflictPolicy if v := os.Getenv(env); v != "" { policy = v } switch policy { case "panic": panic(fmt.Sprintf("%v\nSee %v\n", err, faq)) case "warn": fmt.Fprintf(os.Stderr, "WARNING: %v\nSee %v\n\n", err, faq) return true case "ignore": return true default: panic("invalid " + env + " value: " + os.Getenv(env)) } } var globalMutex sync.RWMutex // GlobalFiles is a global registry of file descriptors. var GlobalFiles *Files = new(Files) // GlobalTypes is the registry used by default for type lookups // unless a local registry is provided by the user. var GlobalTypes *Types = new(Types) // NotFound is a sentinel error value to indicate that the type was not found. // // Since registry lookup can happen in the critical performance path, resolvers // must return this exact error value, not an error wrapping it. var NotFound = errors.New("not found") // Files is a registry for looking up or iterating over files and the // descriptors contained within them. // The Find and Range methods are safe for concurrent use. type Files struct { // The map of descsByName contains: // EnumDescriptor // EnumValueDescriptor // MessageDescriptor // ExtensionDescriptor // ServiceDescriptor // *packageDescriptor // // Note that files are stored as a slice, since a package may contain // multiple files. Only top-level declarations are registered. // Note that enum values are in the top-level since that are in the same // scope as the parent enum. descsByName map[protoreflect.FullName]interface{} filesByPath map[string][]protoreflect.FileDescriptor numFiles int } type packageDescriptor struct { files []protoreflect.FileDescriptor } // RegisterFile registers the provided file descriptor. // // If any descriptor within the file conflicts with the descriptor of any // previously registered file (e.g., two enums with the same full name), // then the file is not registered and an error is returned. // // It is permitted for multiple files to have the same file path. func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { if r == GlobalFiles { globalMutex.Lock() defer globalMutex.Unlock() } if r.descsByName == nil { r.descsByName = map[protoreflect.FullName]interface{}{ "": &packageDescriptor{}, } r.filesByPath = make(map[string][]protoreflect.FileDescriptor) } path := file.Path() if prev := r.filesByPath[path]; len(prev) > 0 { r.checkGenProtoConflict(path) err := errors.New("file %q is already registered", file.Path()) err = amendErrorWithCaller(err, prev[0], file) if !(r == GlobalFiles && ignoreConflict(file, err)) { return err } } for name := file.Package(); name != ""; name = name.Parent() { switch prev := r.descsByName[name]; prev.(type) { case nil, *packageDescriptor: default: err := errors.New("file %q has a package name conflict over %v", file.Path(), name) err = amendErrorWithCaller(err, prev, file) if r == GlobalFiles && ignoreConflict(file, err) { err = nil } return err } } var err error var hasConflict bool rangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) { if prev := r.descsByName[d.FullName()]; prev != nil { hasConflict = true err = errors.New("file %q has a name conflict over %v", file.Path(), d.FullName()) err = amendErrorWithCaller(err, prev, file) if r == GlobalFiles && ignoreConflict(d, err) { err = nil } } }) if hasConflict { return err } for name := file.Package(); name != ""; name = name.Parent() { if r.descsByName[name] == nil { r.descsByName[name] = &packageDescriptor{} } } p := r.descsByName[file.Package()].(*packageDescriptor) p.files = append(p.files, file) rangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) { r.descsByName[d.FullName()] = d }) r.filesByPath[path] = append(r.filesByPath[path], file) r.numFiles++ return nil } // Several well-known types were hosted in the google.golang.org/genproto module // but were later moved to this module. To avoid a weak dependency on the // genproto module (and its relatively large set of transitive dependencies), // we rely on a registration conflict to determine whether the genproto version // is too old (i.e., does not contain aliases to the new type declarations). func (r *Files) checkGenProtoConflict(path string) { if r != GlobalFiles { return } var prevPath string const prevModule = "google.golang.org/genproto" const prevVersion = "cb27e3aa (May 26th, 2020)" switch path { case "google/protobuf/field_mask.proto": prevPath = prevModule + "/protobuf/field_mask" case "google/protobuf/api.proto": prevPath = prevModule + "/protobuf/api" case "google/protobuf/type.proto": prevPath = prevModule + "/protobuf/ptype" case "google/protobuf/source_context.proto": prevPath = prevModule + "/protobuf/source_context" default: return } pkgName := strings.TrimSuffix(strings.TrimPrefix(path, "google/protobuf/"), ".proto") pkgName = strings.Replace(pkgName, "_", "", -1) + "pb" // e.g., "field_mask" => "fieldmaskpb" currPath := "google.golang.org/protobuf/types/known/" + pkgName panic(fmt.Sprintf(""+ "duplicate registration of %q\n"+ "\n"+ "The generated definition for this file has moved:\n"+ "\tfrom: %q\n"+ "\tto: %q\n"+ "A dependency on the %q module must\n"+ "be at version %v or higher.\n"+ "\n"+ "Upgrade the dependency by running:\n"+ "\tgo get -u %v\n", path, prevPath, currPath, prevModule, prevVersion, prevPath)) } // FindDescriptorByName looks up a descriptor by the full name. // // This returns (nil, NotFound) if not found. func (r *Files) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) { if r == nil { return nil, NotFound } if r == GlobalFiles { globalMutex.RLock() defer globalMutex.RUnlock() } prefix := name suffix := nameSuffix("") for prefix != "" { if d, ok := r.descsByName[prefix]; ok { switch d := d.(type) { case protoreflect.EnumDescriptor: if d.FullName() == name { return d, nil } case protoreflect.EnumValueDescriptor: if d.FullName() == name { return d, nil } case protoreflect.MessageDescriptor: if d.FullName() == name { return d, nil } if d := findDescriptorInMessage(d, suffix); d != nil && d.FullName() == name { return d, nil } case protoreflect.ExtensionDescriptor: if d.FullName() == name { return d, nil } case protoreflect.ServiceDescriptor: if d.FullName() == name { return d, nil } if d := d.Methods().ByName(suffix.Pop()); d != nil && d.FullName() == name { return d, nil } } return nil, NotFound } prefix = prefix.Parent() suffix = nameSuffix(name[len(prefix)+len("."):]) } return nil, NotFound } func findDescriptorInMessage(md protoreflect.MessageDescriptor, suffix nameSuffix) protoreflect.Descriptor { name := suffix.Pop() if suffix == "" { if ed := md.Enums().ByName(name); ed != nil { return ed } for i := md.Enums().Len() - 1; i >= 0; i-- { if vd := md.Enums().Get(i).Values().ByName(name); vd != nil { return vd } } if xd := md.Extensions().ByName(name); xd != nil { return xd } if fd := md.Fields().ByName(name); fd != nil { return fd } if od := md.Oneofs().ByName(name); od != nil { return od } } if md := md.Messages().ByName(name); md != nil { if suffix == "" { return md } return findDescriptorInMessage(md, suffix) } return nil } type nameSuffix string func (s *nameSuffix) Pop() (name protoreflect.Name) { if i := strings.IndexByte(string(*s), '.'); i >= 0 { name, *s = protoreflect.Name((*s)[:i]), (*s)[i+1:] } else { name, *s = protoreflect.Name((*s)), "" } return name } // FindFileByPath looks up a file by the path. // // This returns (nil, NotFound) if not found. // This returns an error if multiple files have the same path. func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) { if r == nil { return nil, NotFound } if r == GlobalFiles { globalMutex.RLock() defer globalMutex.RUnlock() } fds := r.filesByPath[path] switch len(fds) { case 0: return nil, NotFound case 1: return fds[0], nil default: return nil, errors.New("multiple files named %q", path) } } // NumFiles reports the number of registered files, // including duplicate files with the same name. func (r *Files) NumFiles() int { if r == nil { return 0 } if r == GlobalFiles { globalMutex.RLock() defer globalMutex.RUnlock() } return r.numFiles } // RangeFiles iterates over all registered files while f returns true. // If multiple files have the same name, RangeFiles iterates over all of them. // The iteration order is undefined. func (r *Files) RangeFiles(f func(protoreflect.FileDescriptor) bool) { if r == nil { return } if r == GlobalFiles { globalMutex.RLock() defer globalMutex.RUnlock() } for _, files := range r.filesByPath { for _, file := range files { if !f(file) { return } } } } // NumFilesByPackage reports the number of registered files in a proto package. func (r *Files) NumFilesByPackage(name protoreflect.FullName) int { if r == nil { return 0 } if r == GlobalFiles { globalMutex.RLock() defer globalMutex.RUnlock() } p, ok := r.descsByName[name].(*packageDescriptor) if !ok { return 0 } return len(p.files) } // RangeFilesByPackage iterates over all registered files in a given proto package // while f returns true. The iteration order is undefined. func (r *Files) RangeFilesByPackage(name protoreflect.FullName, f func(protoreflect.FileDescriptor) bool) { if r == nil { return } if r == GlobalFiles { globalMutex.RLock() defer globalMutex.RUnlock() } p, ok := r.descsByName[name].(*packageDescriptor) if !ok { return } for _, file := range p.files { if !f(file) { return } } } // rangeTopLevelDescriptors iterates over all top-level descriptors in a file // which will be directly entered into the registry. func rangeTopLevelDescriptors(fd protoreflect.FileDescriptor, f func(protoreflect.Descriptor)) { eds := fd.Enums() for i := eds.Len() - 1; i >= 0; i-- { f(eds.Get(i)) vds := eds.Get(i).Values() for i := vds.Len() - 1; i >= 0; i-- { f(vds.Get(i)) } } mds := fd.Messages() for i := mds.Len() - 1; i >= 0; i-- { f(mds.Get(i)) } xds := fd.Extensions() for i := xds.Len() - 1; i >= 0; i-- { f(xds.Get(i)) } sds := fd.Services() for i := sds.Len() - 1; i >= 0; i-- { f(sds.Get(i)) } } // MessageTypeResolver is an interface for looking up messages. // // A compliant implementation must deterministically return the same type // if no error is encountered. // // The Types type implements this interface. type MessageTypeResolver interface { // FindMessageByName looks up a message by its full name. // E.g., "google.protobuf.Any" // // This return (nil, NotFound) if not found. FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) // FindMessageByURL looks up a message by a URL identifier. // See documentation on google.protobuf.Any.type_url for the URL format. // // This returns (nil, NotFound) if not found. FindMessageByURL(url string) (protoreflect.MessageType, error) } // ExtensionTypeResolver is an interface for looking up extensions. // // A compliant implementation must deterministically return the same type // if no error is encountered. // // The Types type implements this interface. type ExtensionTypeResolver interface { // FindExtensionByName looks up a extension field by the field's full name. // Note that this is the full name of the field as determined by // where the extension is declared and is unrelated to the full name of the // message being extended. // // This returns (nil, NotFound) if not found. FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) // FindExtensionByNumber looks up a extension field by the field number // within some parent message, identified by full name. // // This returns (nil, NotFound) if not found. FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } var ( _ MessageTypeResolver = (*Types)(nil) _ ExtensionTypeResolver = (*Types)(nil) ) // Types is a registry for looking up or iterating over descriptor types. // The Find and Range methods are safe for concurrent use. type Types struct { typesByName typesByName extensionsByMessage extensionsByMessage numEnums int numMessages int numExtensions int } type ( typesByName map[protoreflect.FullName]interface{} extensionsByMessage map[protoreflect.FullName]extensionsByNumber extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType ) // RegisterMessage registers the provided message type. // // If a naming conflict occurs, the type is not registered and an error is returned. func (r *Types) RegisterMessage(mt protoreflect.MessageType) error { // Under rare circumstances getting the descriptor might recursively // examine the registry, so fetch it before locking. md := mt.Descriptor() if r == GlobalTypes { globalMutex.Lock() defer globalMutex.Unlock() } if err := r.register("message", md, mt); err != nil { return err } r.numMessages++ return nil } // RegisterEnum registers the provided enum type. // // If a naming conflict occurs, the type is not registered and an error is returned. func (r *Types) RegisterEnum(et protoreflect.EnumType) error { // Under rare circumstances getting the descriptor might recursively // examine the registry, so fetch it before locking. ed := et.Descriptor() if r == GlobalTypes { globalMutex.Lock() defer globalMutex.Unlock() } if err := r.register("enum", ed, et); err != nil { return err } r.numEnums++ return nil } // RegisterExtension registers the provided extension type. // // If a naming conflict occurs, the type is not registered and an error is returned. func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error { // Under rare circumstances getting the descriptor might recursively // examine the registry, so fetch it before locking. // // A known case where this can happen: Fetching the TypeDescriptor for a // legacy ExtensionDesc can consult the global registry. xd := xt.TypeDescriptor() if r == GlobalTypes { globalMutex.Lock() defer globalMutex.Unlock() } field := xd.Number() message := xd.ContainingMessage().FullName() if prev := r.extensionsByMessage[message][field]; prev != nil { err := errors.New("extension number %d is already registered on message %v", field, message) err = amendErrorWithCaller(err, prev, xt) if !(r == GlobalTypes && ignoreConflict(xd, err)) { return err } } if err := r.register("extension", xd, xt); err != nil { return err } if r.extensionsByMessage == nil { r.extensionsByMessage = make(extensionsByMessage) } if r.extensionsByMessage[message] == nil { r.extensionsByMessage[message] = make(extensionsByNumber) } r.extensionsByMessage[message][field] = xt r.numExtensions++ return nil } func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { name := desc.FullName() prev := r.typesByName[name] if prev != nil { err := errors.New("%v %v is already registered", kind, name) err = amendErrorWithCaller(err, prev, typ) if !(r == GlobalTypes && ignoreConflict(desc, err)) { return err } } if r.typesByName == nil { r.typesByName = make(typesByName) } r.typesByName[name] = typ return nil } // FindEnumByName looks up an enum by its full name. // E.g., "google.protobuf.Field.Kind". // // This returns (nil, NotFound) if not found. func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) { if r == nil { return nil, NotFound } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } if v := r.typesByName[enum]; v != nil { if et, _ := v.(protoreflect.EnumType); et != nil { return et, nil } return nil, errors.New("found wrong type: got %v, want enum", typeName(v)) } return nil, NotFound } // FindMessageByName looks up a message by its full name, // e.g. "google.protobuf.Any". // // This returns (nil, NotFound) if not found. func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) { if r == nil { return nil, NotFound } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } if v := r.typesByName[message]; v != nil { if mt, _ := v.(protoreflect.MessageType); mt != nil { return mt, nil } return nil, errors.New("found wrong type: got %v, want message", typeName(v)) } return nil, NotFound } // FindMessageByURL looks up a message by a URL identifier. // See documentation on google.protobuf.Any.type_url for the URL format. // // This returns (nil, NotFound) if not found. func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) { // This function is similar to FindMessageByName but // truncates anything before and including '/' in the URL. if r == nil { return nil, NotFound } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } message := protoreflect.FullName(url) if i := strings.LastIndexByte(url, '/'); i >= 0 { message = message[i+len("/"):] } if v := r.typesByName[message]; v != nil { if mt, _ := v.(protoreflect.MessageType); mt != nil { return mt, nil } return nil, errors.New("found wrong type: got %v, want message", typeName(v)) } return nil, NotFound } // FindExtensionByName looks up a extension field by the field's full name. // Note that this is the full name of the field as determined by // where the extension is declared and is unrelated to the full name of the // message being extended. // // This returns (nil, NotFound) if not found. func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) { if r == nil { return nil, NotFound } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } if v := r.typesByName[field]; v != nil { if xt, _ := v.(protoreflect.ExtensionType); xt != nil { return xt, nil } // MessageSet extensions are special in that the name of the extension // is the name of the message type used to extend the MessageSet. // This naming scheme is used by text and JSON serialization. // // This feature is protected by the ProtoLegacy flag since MessageSets // are a proto1 feature that is long deprecated. if flags.ProtoLegacy { if _, ok := v.(protoreflect.MessageType); ok { field := field.Append(messageset.ExtensionName) if v := r.typesByName[field]; v != nil { if xt, _ := v.(protoreflect.ExtensionType); xt != nil { if messageset.IsMessageSetExtension(xt.TypeDescriptor()) { return xt, nil } } } } } return nil, errors.New("found wrong type: got %v, want extension", typeName(v)) } return nil, NotFound } // FindExtensionByNumber looks up a extension field by the field number // within some parent message, identified by full name. // // This returns (nil, NotFound) if not found. func (r *Types) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) { if r == nil { return nil, NotFound } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } if xt, ok := r.extensionsByMessage[message][field]; ok { return xt, nil } return nil, NotFound } // NumEnums reports the number of registered enums. func (r *Types) NumEnums() int { if r == nil { return 0 } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } return r.numEnums } // RangeEnums iterates over all registered enums while f returns true. // Iteration order is undefined. func (r *Types) RangeEnums(f func(protoreflect.EnumType) bool) { if r == nil { return } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } for _, typ := range r.typesByName { if et, ok := typ.(protoreflect.EnumType); ok { if !f(et) { return } } } } // NumMessages reports the number of registered messages. func (r *Types) NumMessages() int { if r == nil { return 0 } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } return r.numMessages } // RangeMessages iterates over all registered messages while f returns true. // Iteration order is undefined. func (r *Types) RangeMessages(f func(protoreflect.MessageType) bool) { if r == nil { return } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } for _, typ := range r.typesByName { if mt, ok := typ.(protoreflect.MessageType); ok { if !f(mt) { return } } } } // NumExtensions reports the number of registered extensions. func (r *Types) NumExtensions() int { if r == nil { return 0 } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } return r.numExtensions } // RangeExtensions iterates over all registered extensions while f returns true. // Iteration order is undefined. func (r *Types) RangeExtensions(f func(protoreflect.ExtensionType) bool) { if r == nil { return } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } for _, typ := range r.typesByName { if xt, ok := typ.(protoreflect.ExtensionType); ok { if !f(xt) { return } } } } // NumExtensionsByMessage reports the number of registered extensions for // a given message type. func (r *Types) NumExtensionsByMessage(message protoreflect.FullName) int { if r == nil { return 0 } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } return len(r.extensionsByMessage[message]) } // RangeExtensionsByMessage iterates over all registered extensions filtered // by a given message type while f returns true. Iteration order is undefined. func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool) { if r == nil { return } if r == GlobalTypes { globalMutex.RLock() defer globalMutex.RUnlock() } for _, xt := range r.extensionsByMessage[message] { if !f(xt) { return } } } func typeName(t interface{}) string { switch t.(type) { case protoreflect.EnumType: return "enum" case protoreflect.MessageType: return "message" case protoreflect.ExtensionType: return "extension" default: return fmt.Sprintf("%T", t) } } func amendErrorWithCaller(err error, prev, curr interface{}) error { prevPkg := goPackage(prev) currPkg := goPackage(curr) if prevPkg == "" || currPkg == "" || prevPkg == currPkg { return err } return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) } func goPackage(v interface{}) string { switch d := v.(type) { case protoreflect.EnumType: v = d.Descriptor() case protoreflect.MessageType: v = d.Descriptor() case protoreflect.ExtensionType: v = d.TypeDescriptor() } if d, ok := v.(protoreflect.Descriptor); ok { v = d.ParentFile() } if d, ok := v.(interface{ GoPackagePath() string }); ok { return d.GoPackagePath() } return "" }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
// 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 protoreflect import ( "fmt" "math" ) // Value is a union where only one Go type may be set at a time. // The Value is used to represent all possible values a field may take. // The following shows which Go type is used to represent each proto Kind: // // ╔════════════╤═════════════════════════════════════╗ // ║ Go type │ Protobuf kind ║ // ╠════════════╪═════════════════════════════════════╣ // ║ bool │ BoolKind ║ // ║ int32 │ Int32Kind, Sint32Kind, Sfixed32Kind ║ // ║ int64 │ Int64Kind, Sint64Kind, Sfixed64Kind ║ // ║ uint32 │ Uint32Kind, Fixed32Kind ║ // ║ uint64 │ Uint64Kind, Fixed64Kind ║ // ║ float32 │ FloatKind ║ // ║ float64 │ DoubleKind ║ // ║ string │ StringKind ║ // ║ []byte │ BytesKind ║ // ║ EnumNumber │ EnumKind ║ // ║ Message │ MessageKind, GroupKind ║ // ╚════════════╧═════════════════════════════════════╝ // // Multiple protobuf Kinds may be represented by a single Go type if the type // can losslessly represent the information for the proto kind. For example, // Int64Kind, Sint64Kind, and Sfixed64Kind are all represented by int64, // but use different integer encoding methods. // // The List or Map types are used if the field cardinality is repeated. // A field is a List if FieldDescriptor.IsList reports true. // A field is a Map if FieldDescriptor.IsMap reports true. // // Converting to/from a Value and a concrete Go value panics on type mismatch. // For example, ValueOf("hello").Int() panics because this attempts to // retrieve an int64 from a string. type Value value // The protoreflect API uses a custom Value union type instead of interface{} // to keep the future open for performance optimizations. Using an interface{} // always incurs an allocation for primitives (e.g., int64) since it needs to // be boxed on the heap (as interfaces can only contain pointers natively). // Instead, we represent the Value union as a flat struct that internally keeps // track of which type is set. Using unsafe, the Value union can be reduced // down to 24B, which is identical in size to a slice. // // The latest compiler (Go1.11) currently suffers from some limitations: // • With inlining, the compiler should be able to statically prove that // only one of these switch cases are taken and inline one specific case. // See https://golang.org/issue/22310. // ValueOf returns a Value initialized with the concrete value stored in v. // This panics if the type does not match one of the allowed types in the // Value union. func ValueOf(v interface{}) Value { switch v := v.(type) { case nil: return Value{} case bool: return ValueOfBool(v) case int32: return ValueOfInt32(v) case int64: return ValueOfInt64(v) case uint32: return ValueOfUint32(v) case uint64: return ValueOfUint64(v) case float32: return ValueOfFloat32(v) case float64: return ValueOfFloat64(v) case string: return ValueOfString(v) case []byte: return ValueOfBytes(v) case EnumNumber: return ValueOfEnum(v) case Message, List, Map: return valueOfIface(v) case ProtoMessage: panic(fmt.Sprintf("invalid proto.Message(%T) type, expected a protoreflect.Message type", v)) default: panic(fmt.Sprintf("invalid type: %T", v)) } } // ValueOfBool returns a new boolean value. func ValueOfBool(v bool) Value { if v { return Value{typ: boolType, num: 1} } else { return Value{typ: boolType, num: 0} } } // ValueOfInt32 returns a new int32 value. func ValueOfInt32(v int32) Value { return Value{typ: int32Type, num: uint64(v)} } // ValueOfInt64 returns a new int64 value. func ValueOfInt64(v int64) Value { return Value{typ: int64Type, num: uint64(v)} } // ValueOfUint32 returns a new uint32 value. func ValueOfUint32(v uint32) Value { return Value{typ: uint32Type, num: uint64(v)} } // ValueOfUint64 returns a new uint64 value. func ValueOfUint64(v uint64) Value { return Value{typ: uint64Type, num: v} } // ValueOfFloat32 returns a new float32 value. func ValueOfFloat32(v float32) Value { return Value{typ: float32Type, num: uint64(math.Float64bits(float64(v)))} } // ValueOfFloat64 returns a new float64 value. func ValueOfFloat64(v float64) Value { return Value{typ: float64Type, num: uint64(math.Float64bits(float64(v)))} } // ValueOfString returns a new string value. func ValueOfString(v string) Value { return valueOfString(v) } // ValueOfBytes returns a new bytes value. func ValueOfBytes(v []byte) Value { return valueOfBytes(v[:len(v):len(v)]) } // ValueOfEnum returns a new enum value. func ValueOfEnum(v EnumNumber) Value { return Value{typ: enumType, num: uint64(v)} } // ValueOfMessage returns a new Message value. func ValueOfMessage(v Message) Value { return valueOfIface(v) } // ValueOfList returns a new List value. func ValueOfList(v List) Value { return valueOfIface(v) } // ValueOfMap returns a new Map value. func ValueOfMap(v Map) Value { return valueOfIface(v) } // IsValid reports whether v is populated with a value. func (v Value) IsValid() bool { return v.typ != nilType } // Interface returns v as an interface{}. // // Invariant: v == ValueOf(v).Interface() func (v Value) Interface() interface{} { switch v.typ { case nilType: return nil case boolType: return v.Bool() case int32Type: return int32(v.Int()) case int64Type: return int64(v.Int()) case uint32Type: return uint32(v.Uint()) case uint64Type: return uint64(v.Uint()) case float32Type: return float32(v.Float()) case float64Type: return float64(v.Float()) case stringType: return v.String() case bytesType: return v.Bytes() case enumType: return v.Enum() default: return v.getIface() } } func (v Value) typeName() string { switch v.typ { case nilType: return "nil" case boolType: return "bool" case int32Type: return "int32" case int64Type: return "int64" case uint32Type: return "uint32" case uint64Type: return "uint64" case float32Type: return "float32" case float64Type: return "float64" case stringType: return "string" case bytesType: return "bytes" case enumType: return "enum" default: switch v := v.getIface().(type) { case Message: return "message" case List: return "list" case Map: return "map" default: return fmt.Sprintf("<unknown: %T>", v) } } } func (v Value) panicMessage(what string) string { return fmt.Sprintf("type mismatch: cannot convert %v to %s", v.typeName(), what) } // Bool returns v as a bool and panics if the type is not a bool. func (v Value) Bool() bool { switch v.typ { case boolType: return v.num > 0 default: panic(v.panicMessage("bool")) } } // Int returns v as a int64 and panics if the type is not a int32 or int64. func (v Value) Int() int64 { switch v.typ { case int32Type, int64Type: return int64(v.num) default: panic(v.panicMessage("int")) } } // Uint returns v as a uint64 and panics if the type is not a uint32 or uint64. func (v Value) Uint() uint64 { switch v.typ { case uint32Type, uint64Type: return uint64(v.num) default: panic(v.panicMessage("uint")) } } // Float returns v as a float64 and panics if the type is not a float32 or float64. func (v Value) Float() float64 { switch v.typ { case float32Type, float64Type: return math.Float64frombits(uint64(v.num)) default: panic(v.panicMessage("float")) } } // String returns v as a string. Since this method implements fmt.Stringer, // this returns the formatted string value for any non-string type. func (v Value) String() string { switch v.typ { case stringType: return v.getString() default: return fmt.Sprint(v.Interface()) } } // Bytes returns v as a []byte and panics if the type is not a []byte. func (v Value) Bytes() []byte { switch v.typ { case bytesType: return v.getBytes() default: panic(v.panicMessage("bytes")) } } // Enum returns v as a EnumNumber and panics if the type is not a EnumNumber. func (v Value) Enum() EnumNumber { switch v.typ { case enumType: return EnumNumber(v.num) default: panic(v.panicMessage("enum")) } } // Message returns v as a Message and panics if the type is not a Message. func (v Value) Message() Message { switch vi := v.getIface().(type) { case Message: return vi default: panic(v.panicMessage("message")) } } // List returns v as a List and panics if the type is not a List. func (v Value) List() List { switch vi := v.getIface().(type) { case List: return vi default: panic(v.panicMessage("list")) } } // Map returns v as a Map and panics if the type is not a Map. func (v Value) Map() Map { switch vi := v.getIface().(type) { case Map: return vi default: panic(v.panicMessage("map")) } } // MapKey returns v as a MapKey and panics for invalid MapKey types. func (v Value) MapKey() MapKey { switch v.typ { case boolType, int32Type, int64Type, uint32Type, uint64Type, stringType: return MapKey(v) default: panic(v.panicMessage("map key")) } } // MapKey is used to index maps, where the Go type of the MapKey must match // the specified key Kind (see MessageDescriptor.IsMapEntry). // The following shows what Go type is used to represent each proto Kind: // // ╔═════════╤═════════════════════════════════════╗ // ║ Go type │ Protobuf kind ║ // ╠═════════╪═════════════════════════════════════╣ // ║ bool │ BoolKind ║ // ║ int32 │ Int32Kind, Sint32Kind, Sfixed32Kind ║ // ║ int64 │ Int64Kind, Sint64Kind, Sfixed64Kind ║ // ║ uint32 │ Uint32Kind, Fixed32Kind ║ // ║ uint64 │ Uint64Kind, Fixed64Kind ║ // ║ string │ StringKind ║ // ╚═════════╧═════════════════════════════════════╝ // // A MapKey is constructed and accessed through a Value: // k := ValueOf("hash").MapKey() // convert string to MapKey // s := k.String() // convert MapKey to string // // The MapKey is a strict subset of valid types used in Value; // converting a Value to a MapKey with an invalid type panics. type MapKey value // IsValid reports whether k is populated with a value. func (k MapKey) IsValid() bool { return Value(k).IsValid() } // Interface returns k as an interface{}. func (k MapKey) Interface() interface{} { return Value(k).Interface() } // Bool returns k as a bool and panics if the type is not a bool. func (k MapKey) Bool() bool { return Value(k).Bool() } // Int returns k as a int64 and panics if the type is not a int32 or int64. func (k MapKey) Int() int64 { return Value(k).Int() } // Uint returns k as a uint64 and panics if the type is not a uint32 or uint64. func (k MapKey) Uint() uint64 { return Value(k).Uint() } // String returns k as a string. Since this method implements fmt.Stringer, // this returns the formatted string value for any non-string type. func (k MapKey) String() string { return Value(k).String() } // Value returns k as a Value. func (k MapKey) Value() Value { return Value(k) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
// 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 protoreflect // Descriptor provides a set of accessors that are common to every descriptor. // Each descriptor type wraps the equivalent google.protobuf.XXXDescriptorProto, // but provides efficient lookup and immutability. // // Each descriptor is comparable. Equality implies that the two types are // exactly identical. However, it is possible for the same semantically // identical proto type to be represented by multiple type descriptors. // // For example, suppose we have t1 and t2 which are both MessageDescriptors. // If t1 == t2, then the types are definitely equal and all accessors return // the same information. However, if t1 != t2, then it is still possible that // they still represent the same proto type (e.g., t1.FullName == t2.FullName). // This can occur if a descriptor type is created dynamically, or multiple // versions of the same proto type are accidentally linked into the Go binary. type Descriptor interface { // ParentFile returns the parent file descriptor that this descriptor // is declared within. The parent file for the file descriptor is itself. // // Support for this functionality is optional and may return nil. ParentFile() FileDescriptor // Parent returns the parent containing this descriptor declaration. // The following shows the mapping from child type to possible parent types: // // ╔═════════════════════╤═══════════════════════════════════╗ // ║ Child type │ Possible parent types ║ // ╠═════════════════════╪═══════════════════════════════════╣ // ║ FileDescriptor │ nil ║ // ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ // ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ // ║ OneofDescriptor │ MessageDescriptor ║ // ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ // ║ EnumValueDescriptor │ EnumDescriptor ║ // ║ ServiceDescriptor │ FileDescriptor ║ // ║ MethodDescriptor │ ServiceDescriptor ║ // ╚═════════════════════╧═══════════════════════════════════╝ // // Support for this functionality is optional and may return nil. Parent() Descriptor // Index returns the index of this descriptor within its parent. // It returns 0 if the descriptor does not have a parent or if the parent // is unknown. Index() int // Syntax is the protobuf syntax. Syntax() Syntax // e.g., Proto2 or Proto3 // Name is the short name of the declaration (i.e., FullName.Name). Name() Name // e.g., "Any" // FullName is the fully-qualified name of the declaration. // // The FullName is a concatenation of the full name of the type that this // type is declared within and the declaration name. For example, // field "foo_field" in message "proto.package.MyMessage" is // uniquely identified as "proto.package.MyMessage.foo_field". // Enum values are an exception to the rule (see EnumValueDescriptor). FullName() FullName // e.g., "google.protobuf.Any" // IsPlaceholder reports whether type information is missing since a // dependency is not resolved, in which case only name information is known. // // Placeholder types may only be returned by the following accessors // as a result of unresolved dependencies or weak imports: // // ╔═══════════════════════════════════╤═════════════════════╗ // ║ Accessor │ Descriptor ║ // ╠═══════════════════════════════════╪═════════════════════╣ // ║ FileImports.FileDescriptor │ FileDescriptor ║ // ║ FieldDescriptor.Enum │ EnumDescriptor ║ // ║ FieldDescriptor.Message │ MessageDescriptor ║ // ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ // ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ // ║ MethodDescriptor.Input │ MessageDescriptor ║ // ║ MethodDescriptor.Output │ MessageDescriptor ║ // ╚═══════════════════════════════════╧═════════════════════╝ // // If true, only Name and FullName are valid. // For FileDescriptor, the Path is also valid. IsPlaceholder() bool // Options returns the descriptor options. The caller must not modify // the returned value. // // To avoid a dependency cycle, this function returns a proto.Message value. // The proto message type returned for each descriptor type is as follows: // ╔═════════════════════╤══════════════════════════════════════════╗ // ║ Go type │ Protobuf message type ║ // ╠═════════════════════╪══════════════════════════════════════════╣ // ║ FileDescriptor │ google.protobuf.FileOptions ║ // ║ EnumDescriptor │ google.protobuf.EnumOptions ║ // ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ // ║ MessageDescriptor │ google.protobuf.MessageOptions ║ // ║ FieldDescriptor │ google.protobuf.FieldOptions ║ // ║ OneofDescriptor │ google.protobuf.OneofOptions ║ // ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ // ║ MethodDescriptor │ google.protobuf.MethodOptions ║ // ╚═════════════════════╧══════════════════════════════════════════╝ // // This method returns a typed nil-pointer if no options are present. // The caller must import the descriptorpb package to use this. Options() ProtoMessage doNotImplement } // FileDescriptor describes the types in a complete proto file and // corresponds with the google.protobuf.FileDescriptorProto message. // // Top-level declarations: // EnumDescriptor, MessageDescriptor, FieldDescriptor, and/or ServiceDescriptor. type FileDescriptor interface { Descriptor // Descriptor.FullName is identical to Package // Path returns the file name, relative to the source tree root. Path() string // e.g., "path/to/file.proto" // Package returns the protobuf package namespace. Package() FullName // e.g., "google.protobuf" // Imports is a list of imported proto files. Imports() FileImports // Enums is a list of the top-level enum declarations. Enums() EnumDescriptors // Messages is a list of the top-level message declarations. Messages() MessageDescriptors // Extensions is a list of the top-level extension declarations. Extensions() ExtensionDescriptors // Services is a list of the top-level service declarations. Services() ServiceDescriptors // SourceLocations is a list of source locations. SourceLocations() SourceLocations isFileDescriptor } type isFileDescriptor interface{ ProtoType(FileDescriptor) } // FileImports is a list of file imports. type FileImports interface { // Len reports the number of files imported by this proto file. Len() int // Get returns the ith FileImport. It panics if out of bounds. Get(i int) FileImport doNotImplement } // FileImport is the declaration for a proto file import. type FileImport struct { // FileDescriptor is the file type for the given import. // It is a placeholder descriptor if IsWeak is set or if a dependency has // not been regenerated to implement the new reflection APIs. FileDescriptor // IsPublic reports whether this is a public import, which causes this file // to alias declarations within the imported file. The intended use cases // for this feature is the ability to move proto files without breaking // existing dependencies. // // The current file and the imported file must be within proto package. IsPublic bool // IsWeak reports whether this is a weak import, which does not impose // a direct dependency on the target file. // // Weak imports are a legacy proto1 feature. Equivalent behavior is // achieved using proto2 extension fields or proto3 Any messages. IsWeak bool } // MessageDescriptor describes a message and // corresponds with the google.protobuf.DescriptorProto message. // // Nested declarations: // FieldDescriptor, OneofDescriptor, FieldDescriptor, EnumDescriptor, // and/or MessageDescriptor. type MessageDescriptor interface { Descriptor // IsMapEntry indicates that this is an auto-generated message type to // represent the entry type for a map field. // // Map entry messages have only two fields: // • a "key" field with a field number of 1 // • a "value" field with a field number of 2 // The key and value types are determined by these two fields. // // If IsMapEntry is true, it implies that FieldDescriptor.IsMap is true // for some field with this message type. IsMapEntry() bool // Fields is a list of nested field declarations. Fields() FieldDescriptors // Oneofs is a list of nested oneof declarations. Oneofs() OneofDescriptors // ReservedNames is a list of reserved field names. ReservedNames() Names // ReservedRanges is a list of reserved ranges of field numbers. ReservedRanges() FieldRanges // RequiredNumbers is a list of required field numbers. // In Proto3, it is always an empty list. RequiredNumbers() FieldNumbers // ExtensionRanges is the field ranges used for extension fields. // In Proto3, it is always an empty ranges. ExtensionRanges() FieldRanges // ExtensionRangeOptions returns the ith extension range options. // // To avoid a dependency cycle, this method returns a proto.Message value, // which always contains a google.protobuf.ExtensionRangeOptions message. // This method returns a typed nil-pointer if no options are present. // The caller must import the descriptorpb package to use this. ExtensionRangeOptions(i int) ProtoMessage // Enums is a list of nested enum declarations. Enums() EnumDescriptors // Messages is a list of nested message declarations. Messages() MessageDescriptors // Extensions is a list of nested extension declarations. Extensions() ExtensionDescriptors isMessageDescriptor } type isMessageDescriptor interface{ ProtoType(MessageDescriptor) } // MessageType encapsulates a MessageDescriptor with a concrete Go implementation. // It is recommended that implementations of this interface also implement the // MessageFieldTypes interface. type MessageType interface { // New returns a newly allocated empty message. // It may return nil for synthetic messages representing a map entry. New() Message // Zero returns an empty, read-only message. // It may return nil for synthetic messages representing a map entry. Zero() Message // Descriptor returns the message descriptor. // // Invariant: t.Descriptor() == t.New().Descriptor() Descriptor() MessageDescriptor } // MessageFieldTypes extends a MessageType by providing type information // regarding enums and messages referenced by the message fields. type MessageFieldTypes interface { MessageType // Enum returns the EnumType for the ith field in Descriptor.Fields. // It returns nil if the ith field is not an enum kind. // It panics if out of bounds. // // Invariant: mt.Enum(i).Descriptor() == mt.Descriptor().Fields(i).Enum() Enum(i int) EnumType // Message returns the MessageType for the ith field in Descriptor.Fields. // It returns nil if the ith field is not a message or group kind. // It panics if out of bounds. // // Invariant: mt.Message(i).Descriptor() == mt.Descriptor().Fields(i).Message() Message(i int) MessageType } // MessageDescriptors is a list of message declarations. type MessageDescriptors interface { // Len reports the number of messages. Len() int // Get returns the ith MessageDescriptor. It panics if out of bounds. Get(i int) MessageDescriptor // ByName returns the MessageDescriptor for a message named s. // It returns nil if not found. ByName(s Name) MessageDescriptor doNotImplement } // FieldDescriptor describes a field within a message and // corresponds with the google.protobuf.FieldDescriptorProto message. // // It is used for both normal fields defined within the parent message // (e.g., MessageDescriptor.Fields) and fields that extend some remote message // (e.g., FileDescriptor.Extensions or MessageDescriptor.Extensions). type FieldDescriptor interface { Descriptor // Number reports the unique number for this field. Number() FieldNumber // Cardinality reports the cardinality for this field. Cardinality() Cardinality // Kind reports the basic kind for this field. Kind() Kind // HasJSONName reports whether this field has an explicitly set JSON name. HasJSONName() bool // JSONName reports the name used for JSON serialization. // It is usually the camel-cased form of the field name. // Extension fields are represented by the full name surrounded by brackets. JSONName() string // TextName reports the name used for text serialization. // It is usually the name of the field, except that groups use the name // of the inlined message, and extension fields are represented by the // full name surrounded by brackets. TextName() string // HasPresence reports whether the field distinguishes between unpopulated // and default values. HasPresence() bool // IsExtension reports whether this is an extension field. If false, // then Parent and ContainingMessage refer to the same message. // Otherwise, ContainingMessage and Parent likely differ. IsExtension() bool // HasOptionalKeyword reports whether the "optional" keyword was explicitly // specified in the source .proto file. HasOptionalKeyword() bool // IsWeak reports whether this is a weak field, which does not impose a // direct dependency on the target type. // If true, then Message returns a placeholder type. IsWeak() bool // IsPacked reports whether repeated primitive numeric kinds should be // serialized using a packed encoding. // If true, then it implies Cardinality is Repeated. IsPacked() bool // IsList reports whether this field represents a list, // where the value type for the associated field is a List. // It is equivalent to checking whether Cardinality is Repeated and // that IsMap reports false. IsList() bool // IsMap reports whether this field represents a map, // where the value type for the associated field is a Map. // It is equivalent to checking whether Cardinality is Repeated, // that the Kind is MessageKind, and that Message.IsMapEntry reports true. IsMap() bool // MapKey returns the field descriptor for the key in the map entry. // It returns nil if IsMap reports false. MapKey() FieldDescriptor // MapValue returns the field descriptor for the value in the map entry. // It returns nil if IsMap reports false. MapValue() FieldDescriptor // HasDefault reports whether this field has a default value. HasDefault() bool // Default returns the default value for scalar fields. // For proto2, it is the default value as specified in the proto file, // or the zero value if unspecified. // For proto3, it is always the zero value of the scalar. // The Value type is determined by the Kind. Default() Value // DefaultEnumValue returns the enum value descriptor for the default value // of an enum field, and is nil for any other kind of field. DefaultEnumValue() EnumValueDescriptor // ContainingOneof is the containing oneof that this field belongs to, // and is nil if this field is not part of a oneof. ContainingOneof() OneofDescriptor // ContainingMessage is the containing message that this field belongs to. // For extension fields, this may not necessarily be the parent message // that the field is declared within. ContainingMessage() MessageDescriptor // Enum is the enum descriptor if Kind is EnumKind. // It returns nil for any other Kind. Enum() EnumDescriptor // Message is the message descriptor if Kind is // MessageKind or GroupKind. It returns nil for any other Kind. Message() MessageDescriptor isFieldDescriptor } type isFieldDescriptor interface{ ProtoType(FieldDescriptor) } // FieldDescriptors is a list of field declarations. type FieldDescriptors interface { // Len reports the number of fields. Len() int // Get returns the ith FieldDescriptor. It panics if out of bounds. Get(i int) FieldDescriptor // ByName returns the FieldDescriptor for a field named s. // It returns nil if not found. ByName(s Name) FieldDescriptor // ByJSONName returns the FieldDescriptor for a field with s as the JSON name. // It returns nil if not found. ByJSONName(s string) FieldDescriptor // ByTextName returns the FieldDescriptor for a field with s as the text name. // It returns nil if not found. ByTextName(s string) FieldDescriptor // ByNumber returns the FieldDescriptor for a field numbered n. // It returns nil if not found. ByNumber(n FieldNumber) FieldDescriptor doNotImplement } // OneofDescriptor describes a oneof field set within a given message and // corresponds with the google.protobuf.OneofDescriptorProto message. type OneofDescriptor interface { Descriptor // IsSynthetic reports whether this is a synthetic oneof created to support // proto3 optional semantics. If true, Fields contains exactly one field // with HasOptionalKeyword specified. IsSynthetic() bool // Fields is a list of fields belonging to this oneof. Fields() FieldDescriptors isOneofDescriptor } type isOneofDescriptor interface{ ProtoType(OneofDescriptor) } // OneofDescriptors is a list of oneof declarations. type OneofDescriptors interface { // Len reports the number of oneof fields. Len() int // Get returns the ith OneofDescriptor. It panics if out of bounds. Get(i int) OneofDescriptor // ByName returns the OneofDescriptor for a oneof named s. // It returns nil if not found. ByName(s Name) OneofDescriptor doNotImplement } // ExtensionDescriptor is an alias of FieldDescriptor for documentation. type ExtensionDescriptor = FieldDescriptor // ExtensionTypeDescriptor is an ExtensionDescriptor with an associated ExtensionType. type ExtensionTypeDescriptor interface { ExtensionDescriptor // Type returns the associated ExtensionType. Type() ExtensionType // Descriptor returns the plain ExtensionDescriptor without the // associated ExtensionType. Descriptor() ExtensionDescriptor } // ExtensionDescriptors is a list of field declarations. type ExtensionDescriptors interface { // Len reports the number of fields. Len() int // Get returns the ith ExtensionDescriptor. It panics if out of bounds. Get(i int) ExtensionDescriptor // ByName returns the ExtensionDescriptor for a field named s. // It returns nil if not found. ByName(s Name) ExtensionDescriptor doNotImplement } // ExtensionType encapsulates an ExtensionDescriptor with a concrete // Go implementation. The nested field descriptor must be for a extension field. // // While a normal field is a member of the parent message that it is declared // within (see Descriptor.Parent), an extension field is a member of some other // target message (see ExtensionDescriptor.Extendee) and may have no // relationship with the parent. However, the full name of an extension field is // relative to the parent that it is declared within. // // For example: // syntax = "proto2"; // package example; // message FooMessage { // extensions 100 to max; // } // message BarMessage { // extends FooMessage { optional BarMessage bar_field = 100; } // } // // Field "bar_field" is an extension of FooMessage, but its full name is // "example.BarMessage.bar_field" instead of "example.FooMessage.bar_field". type ExtensionType interface { // New returns a new value for the field. // For scalars, this returns the default value in native Go form. New() Value // Zero returns a new value for the field. // For scalars, this returns the default value in native Go form. // For composite types, this returns an empty, read-only message, list, or map. Zero() Value // TypeDescriptor returns the extension type descriptor. TypeDescriptor() ExtensionTypeDescriptor // ValueOf wraps the input and returns it as a Value. // ValueOf panics if the input value is invalid or not the appropriate type. // // ValueOf is more extensive than protoreflect.ValueOf for a given field's // value as it has more type information available. ValueOf(interface{}) Value // InterfaceOf completely unwraps the Value to the underlying Go type. // InterfaceOf panics if the input is nil or does not represent the // appropriate underlying Go type. For composite types, it panics if the // value is not mutable. // // InterfaceOf is able to unwrap the Value further than Value.Interface // as it has more type information available. InterfaceOf(Value) interface{} // IsValidValue reports whether the Value is valid to assign to the field. IsValidValue(Value) bool // IsValidInterface reports whether the input is valid to assign to the field. IsValidInterface(interface{}) bool } // EnumDescriptor describes an enum and // corresponds with the google.protobuf.EnumDescriptorProto message. // // Nested declarations: // EnumValueDescriptor. type EnumDescriptor interface { Descriptor // Values is a list of nested enum value declarations. Values() EnumValueDescriptors // ReservedNames is a list of reserved enum names. ReservedNames() Names // ReservedRanges is a list of reserved ranges of enum numbers. ReservedRanges() EnumRanges isEnumDescriptor } type isEnumDescriptor interface{ ProtoType(EnumDescriptor) } // EnumType encapsulates an EnumDescriptor with a concrete Go implementation. type EnumType interface { // New returns an instance of this enum type with its value set to n. New(n EnumNumber) Enum // Descriptor returns the enum descriptor. // // Invariant: t.Descriptor() == t.New(0).Descriptor() Descriptor() EnumDescriptor } // EnumDescriptors is a list of enum declarations. type EnumDescriptors interface { // Len reports the number of enum types. Len() int // Get returns the ith EnumDescriptor. It panics if out of bounds. Get(i int) EnumDescriptor // ByName returns the EnumDescriptor for an enum named s. // It returns nil if not found. ByName(s Name) EnumDescriptor doNotImplement } // EnumValueDescriptor describes an enum value and // corresponds with the google.protobuf.EnumValueDescriptorProto message. // // All other proto declarations are in the namespace of the parent. // However, enum values do not follow this rule and are within the namespace // of the parent's parent (i.e., they are a sibling of the containing enum). // Thus, a value named "FOO_VALUE" declared within an enum uniquely identified // as "proto.package.MyEnum" has a full name of "proto.package.FOO_VALUE". type EnumValueDescriptor interface { Descriptor // Number returns the enum value as an integer. Number() EnumNumber isEnumValueDescriptor } type isEnumValueDescriptor interface{ ProtoType(EnumValueDescriptor) } // EnumValueDescriptors is a list of enum value declarations. type EnumValueDescriptors interface { // Len reports the number of enum values. Len() int // Get returns the ith EnumValueDescriptor. It panics if out of bounds. Get(i int) EnumValueDescriptor // ByName returns the EnumValueDescriptor for the enum value named s. // It returns nil if not found. ByName(s Name) EnumValueDescriptor // ByNumber returns the EnumValueDescriptor for the enum value numbered n. // If multiple have the same number, the first one defined is returned // It returns nil if not found. ByNumber(n EnumNumber) EnumValueDescriptor doNotImplement } // ServiceDescriptor describes a service and // corresponds with the google.protobuf.ServiceDescriptorProto message. // // Nested declarations: MethodDescriptor. type ServiceDescriptor interface { Descriptor // Methods is a list of nested message declarations. Methods() MethodDescriptors isServiceDescriptor } type isServiceDescriptor interface{ ProtoType(ServiceDescriptor) } // ServiceDescriptors is a list of service declarations. type ServiceDescriptors interface { // Len reports the number of services. Len() int // Get returns the ith ServiceDescriptor. It panics if out of bounds. Get(i int) ServiceDescriptor // ByName returns the ServiceDescriptor for a service named s. // It returns nil if not found. ByName(s Name) ServiceDescriptor doNotImplement } // MethodDescriptor describes a method and // corresponds with the google.protobuf.MethodDescriptorProto message. type MethodDescriptor interface { Descriptor // Input is the input message descriptor. Input() MessageDescriptor // Output is the output message descriptor. Output() MessageDescriptor // IsStreamingClient reports whether the client streams multiple messages. IsStreamingClient() bool // IsStreamingServer reports whether the server streams multiple messages. IsStreamingServer() bool isMethodDescriptor } type isMethodDescriptor interface{ ProtoType(MethodDescriptor) } // MethodDescriptors is a list of method declarations. type MethodDescriptors interface { // Len reports the number of methods. Len() int // Get returns the ith MethodDescriptor. It panics if out of bounds. Get(i int) MethodDescriptor // ByName returns the MethodDescriptor for a service method named s. // It returns nil if not found. ByName(s Name) MethodDescriptor doNotImplement }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
// 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. // +build purego appengine package protoreflect import "google.golang.org/protobuf/internal/pragma" type valueType int const ( nilType valueType = iota boolType int32Type int64Type uint32Type uint64Type float32Type float64Type stringType bytesType enumType ifaceType ) // value is a union where only one type can be represented at a time. // This uses a distinct field for each type. This is type safe in Go, but // occupies more memory than necessary (72B). type value struct { pragma.DoNotCompare // 0B typ valueType // 8B num uint64 // 8B str string // 16B bin []byte // 24B iface interface{} // 16B } func valueOfString(v string) Value { return Value{typ: stringType, str: v} } func valueOfBytes(v []byte) Value { return Value{typ: bytesType, bin: v} } func valueOfIface(v interface{}) Value { return Value{typ: ifaceType, iface: v} } func (v Value) getString() string { return v.str } func (v Value) getBytes() []byte { return v.bin } func (v Value) getIface() interface{} { return v.iface }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go
// 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. // +build !purego,!appengine package protoreflect import ( "unsafe" "google.golang.org/protobuf/internal/pragma" ) type ( stringHeader struct { Data unsafe.Pointer Len int } sliceHeader struct { Data unsafe.Pointer Len int Cap int } ifaceHeader struct { Type unsafe.Pointer Data unsafe.Pointer } ) var ( nilType = typeOf(nil) boolType = typeOf(*new(bool)) int32Type = typeOf(*new(int32)) int64Type = typeOf(*new(int64)) uint32Type = typeOf(*new(uint32)) uint64Type = typeOf(*new(uint64)) float32Type = typeOf(*new(float32)) float64Type = typeOf(*new(float64)) stringType = typeOf(*new(string)) bytesType = typeOf(*new([]byte)) enumType = typeOf(*new(EnumNumber)) ) // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. func typeOf(t interface{}) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } // value is a union where only one type can be represented at a time. // The struct is 24B large on 64-bit systems and requires the minimum storage // necessary to represent each possible type. // // The Go GC needs to be able to scan variables containing pointers. // As such, pointers and non-pointers cannot be intermixed. type value struct { pragma.DoNotCompare // 0B // typ stores the type of the value as a pointer to the Go type. typ unsafe.Pointer // 8B // ptr stores the data pointer for a String, Bytes, or interface value. ptr unsafe.Pointer // 8B // num stores a Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, or // Enum value as a raw uint64. // // It is also used to store the length of a String or Bytes value; // the capacity is ignored. num uint64 // 8B } func valueOfString(v string) Value { p := (*stringHeader)(unsafe.Pointer(&v)) return Value{typ: stringType, ptr: p.Data, num: uint64(len(v))} } func valueOfBytes(v []byte) Value { p := (*sliceHeader)(unsafe.Pointer(&v)) return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} } func valueOfIface(v interface{}) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } func (v Value) getString() (x string) { *(*stringHeader)(unsafe.Pointer(&x)) = stringHeader{Data: v.ptr, Len: int(v.num)} return x } func (v Value) getBytes() (x []byte) { *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} return x } func (v Value) getIface() (x interface{}) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
// 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. // Code generated by generate-protos. DO NOT EDIT. package protoreflect func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 2: b = p.appendSingularField(b, "package", nil) case 3: b = p.appendRepeatedField(b, "dependency", nil) case 10: b = p.appendRepeatedField(b, "public_dependency", nil) case 11: b = p.appendRepeatedField(b, "weak_dependency", nil) case 4: b = p.appendRepeatedField(b, "message_type", (*SourcePath).appendDescriptorProto) case 5: b = p.appendRepeatedField(b, "enum_type", (*SourcePath).appendEnumDescriptorProto) case 6: b = p.appendRepeatedField(b, "service", (*SourcePath).appendServiceDescriptorProto) case 7: b = p.appendRepeatedField(b, "extension", (*SourcePath).appendFieldDescriptorProto) case 8: b = p.appendSingularField(b, "options", (*SourcePath).appendFileOptions) case 9: b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo) case 12: b = p.appendSingularField(b, "syntax", nil) } return b } func (p *SourcePath) appendDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 2: b = p.appendRepeatedField(b, "field", (*SourcePath).appendFieldDescriptorProto) case 6: b = p.appendRepeatedField(b, "extension", (*SourcePath).appendFieldDescriptorProto) case 3: b = p.appendRepeatedField(b, "nested_type", (*SourcePath).appendDescriptorProto) case 4: b = p.appendRepeatedField(b, "enum_type", (*SourcePath).appendEnumDescriptorProto) case 5: b = p.appendRepeatedField(b, "extension_range", (*SourcePath).appendDescriptorProto_ExtensionRange) case 8: b = p.appendRepeatedField(b, "oneof_decl", (*SourcePath).appendOneofDescriptorProto) case 7: b = p.appendSingularField(b, "options", (*SourcePath).appendMessageOptions) case 9: b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendDescriptorProto_ReservedRange) case 10: b = p.appendRepeatedField(b, "reserved_name", nil) } return b } func (p *SourcePath) appendEnumDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 2: b = p.appendRepeatedField(b, "value", (*SourcePath).appendEnumValueDescriptorProto) case 3: b = p.appendSingularField(b, "options", (*SourcePath).appendEnumOptions) case 4: b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendEnumDescriptorProto_EnumReservedRange) case 5: b = p.appendRepeatedField(b, "reserved_name", nil) } return b } func (p *SourcePath) appendServiceDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 2: b = p.appendRepeatedField(b, "method", (*SourcePath).appendMethodDescriptorProto) case 3: b = p.appendSingularField(b, "options", (*SourcePath).appendServiceOptions) } return b } func (p *SourcePath) appendFieldDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 3: b = p.appendSingularField(b, "number", nil) case 4: b = p.appendSingularField(b, "label", nil) case 5: b = p.appendSingularField(b, "type", nil) case 6: b = p.appendSingularField(b, "type_name", nil) case 2: b = p.appendSingularField(b, "extendee", nil) case 7: b = p.appendSingularField(b, "default_value", nil) case 9: b = p.appendSingularField(b, "oneof_index", nil) case 10: b = p.appendSingularField(b, "json_name", nil) case 8: b = p.appendSingularField(b, "options", (*SourcePath).appendFieldOptions) case 17: b = p.appendSingularField(b, "proto3_optional", nil) } return b } func (p *SourcePath) appendFileOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "java_package", nil) case 8: b = p.appendSingularField(b, "java_outer_classname", nil) case 10: b = p.appendSingularField(b, "java_multiple_files", nil) case 20: b = p.appendSingularField(b, "java_generate_equals_and_hash", nil) case 27: b = p.appendSingularField(b, "java_string_check_utf8", nil) case 9: b = p.appendSingularField(b, "optimize_for", nil) case 11: b = p.appendSingularField(b, "go_package", nil) case 16: b = p.appendSingularField(b, "cc_generic_services", nil) case 17: b = p.appendSingularField(b, "java_generic_services", nil) case 18: b = p.appendSingularField(b, "py_generic_services", nil) case 42: b = p.appendSingularField(b, "php_generic_services", nil) case 23: b = p.appendSingularField(b, "deprecated", nil) case 31: b = p.appendSingularField(b, "cc_enable_arenas", nil) case 36: b = p.appendSingularField(b, "objc_class_prefix", nil) case 37: b = p.appendSingularField(b, "csharp_namespace", nil) case 39: b = p.appendSingularField(b, "swift_prefix", nil) case 40: b = p.appendSingularField(b, "php_class_prefix", nil) case 41: b = p.appendSingularField(b, "php_namespace", nil) case 44: b = p.appendSingularField(b, "php_metadata_namespace", nil) case 45: b = p.appendSingularField(b, "ruby_package", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendSourceCodeInfo(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendRepeatedField(b, "location", (*SourcePath).appendSourceCodeInfo_Location) } return b } func (p *SourcePath) appendDescriptorProto_ExtensionRange(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "start", nil) case 2: b = p.appendSingularField(b, "end", nil) case 3: b = p.appendSingularField(b, "options", (*SourcePath).appendExtensionRangeOptions) } return b } func (p *SourcePath) appendOneofDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 2: b = p.appendSingularField(b, "options", (*SourcePath).appendOneofOptions) } return b } func (p *SourcePath) appendMessageOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "message_set_wire_format", nil) case 2: b = p.appendSingularField(b, "no_standard_descriptor_accessor", nil) case 3: b = p.appendSingularField(b, "deprecated", nil) case 7: b = p.appendSingularField(b, "map_entry", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendDescriptorProto_ReservedRange(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "start", nil) case 2: b = p.appendSingularField(b, "end", nil) } return b } func (p *SourcePath) appendEnumValueDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 2: b = p.appendSingularField(b, "number", nil) case 3: b = p.appendSingularField(b, "options", (*SourcePath).appendEnumValueOptions) } return b } func (p *SourcePath) appendEnumOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 2: b = p.appendSingularField(b, "allow_alias", nil) case 3: b = p.appendSingularField(b, "deprecated", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendEnumDescriptorProto_EnumReservedRange(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "start", nil) case 2: b = p.appendSingularField(b, "end", nil) } return b } func (p *SourcePath) appendMethodDescriptorProto(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name", nil) case 2: b = p.appendSingularField(b, "input_type", nil) case 3: b = p.appendSingularField(b, "output_type", nil) case 4: b = p.appendSingularField(b, "options", (*SourcePath).appendMethodOptions) case 5: b = p.appendSingularField(b, "client_streaming", nil) case 6: b = p.appendSingularField(b, "server_streaming", nil) } return b } func (p *SourcePath) appendServiceOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 33: b = p.appendSingularField(b, "deprecated", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendFieldOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "ctype", nil) case 2: b = p.appendSingularField(b, "packed", nil) case 6: b = p.appendSingularField(b, "jstype", nil) case 5: b = p.appendSingularField(b, "lazy", nil) case 3: b = p.appendSingularField(b, "deprecated", nil) case 10: b = p.appendSingularField(b, "weak", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendUninterpretedOption(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 2: b = p.appendRepeatedField(b, "name", (*SourcePath).appendUninterpretedOption_NamePart) case 3: b = p.appendSingularField(b, "identifier_value", nil) case 4: b = p.appendSingularField(b, "positive_int_value", nil) case 5: b = p.appendSingularField(b, "negative_int_value", nil) case 6: b = p.appendSingularField(b, "double_value", nil) case 7: b = p.appendSingularField(b, "string_value", nil) case 8: b = p.appendSingularField(b, "aggregate_value", nil) } return b } func (p *SourcePath) appendSourceCodeInfo_Location(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendRepeatedField(b, "path", nil) case 2: b = p.appendRepeatedField(b, "span", nil) case 3: b = p.appendSingularField(b, "leading_comments", nil) case 4: b = p.appendSingularField(b, "trailing_comments", nil) case 6: b = p.appendRepeatedField(b, "leading_detached_comments", nil) } return b } func (p *SourcePath) appendExtensionRangeOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendOneofOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendEnumValueOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "deprecated", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendMethodOptions(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 33: b = p.appendSingularField(b, "deprecated", nil) case 34: b = p.appendSingularField(b, "idempotency_level", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte { if len(*p) == 0 { return b } switch (*p)[0] { case 1: b = p.appendSingularField(b, "name_part", nil) case 2: b = p.appendSingularField(b, "is_extension", nil) } return b }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
// 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 protoreflect provides interfaces to dynamically manipulate messages. // // This package includes type descriptors which describe the structure of types // defined in proto source files and value interfaces which provide the // ability to examine and manipulate the contents of messages. // // // Protocol Buffer Descriptors // // Protobuf descriptors (e.g., EnumDescriptor or MessageDescriptor) // are immutable objects that represent protobuf type information. // They are wrappers around the messages declared in descriptor.proto. // Protobuf descriptors alone lack any information regarding Go types. // // Enums and messages generated by this module implement Enum and ProtoMessage, // where the Descriptor and ProtoReflect.Descriptor accessors respectively // return the protobuf descriptor for the values. // // The protobuf descriptor interfaces are not meant to be implemented by // user code since they might need to be extended in the future to support // additions to the protobuf language. // The "google.golang.org/protobuf/reflect/protodesc" package converts between // google.protobuf.DescriptorProto messages and protobuf descriptors. // // // Go Type Descriptors // // A type descriptor (e.g., EnumType or MessageType) is a constructor for // a concrete Go type that represents the associated protobuf descriptor. // There is commonly a one-to-one relationship between protobuf descriptors and // Go type descriptors, but it can potentially be a one-to-many relationship. // // Enums and messages generated by this module implement Enum and ProtoMessage, // where the Type and ProtoReflect.Type accessors respectively // return the protobuf descriptor for the values. // // The "google.golang.org/protobuf/types/dynamicpb" package can be used to // create Go type descriptors from protobuf descriptors. // // // Value Interfaces // // The Enum and Message interfaces provide a reflective view over an // enum or message instance. For enums, it provides the ability to retrieve // the enum value number for any concrete enum type. For messages, it provides // the ability to access or manipulate fields of the message. // // To convert a proto.Message to a protoreflect.Message, use the // former's ProtoReflect method. Since the ProtoReflect method is new to the // v2 message interface, it may not be present on older message implementations. // The "github.com/golang/protobuf/proto".MessageReflect function can be used // to obtain a reflective view on older messages. // // // Relationships // // The following diagrams demonstrate the relationships between // various types declared in this package. // // // ┌───────────────────────────────────┐ // V │ // ┌────────────── New(n) ─────────────┐ │ // │ │ │ // │ ┌──── Descriptor() ──┐ │ ┌── Number() ──┐ │ // │ │ V V │ V │ // ╔════════════╗ ╔════════════════╗ ╔════════╗ ╔════════════╗ // ║ EnumType ║ ║ EnumDescriptor ║ ║ Enum ║ ║ EnumNumber ║ // ╚════════════╝ ╚════════════════╝ ╚════════╝ ╚════════════╝ // Λ Λ │ │ // │ └─── Descriptor() ──┘ │ // │ │ // └────────────────── Type() ───────┘ // // • An EnumType describes a concrete Go enum type. // It has an EnumDescriptor and can construct an Enum instance. // // • An EnumDescriptor describes an abstract protobuf enum type. // // • An Enum is a concrete enum instance. Generated enums implement Enum. // // // ┌──────────────── New() ─────────────────┐ // │ │ // │ ┌─── Descriptor() ─────┐ │ ┌── Interface() ───┐ // │ │ V V │ V // ╔═════════════╗ ╔═══════════════════╗ ╔═════════╗ ╔══════════════╗ // ║ MessageType ║ ║ MessageDescriptor ║ ║ Message ║ ║ ProtoMessage ║ // ╚═════════════╝ ╚═══════════════════╝ ╚═════════╝ ╚══════════════╝ // Λ Λ │ │ Λ │ // │ └──── Descriptor() ────┘ │ └─ ProtoReflect() ─┘ // │ │ // └─────────────────── Type() ─────────┘ // // • A MessageType describes a concrete Go message type. // It has a MessageDescriptor and can construct a Message instance. // // • A MessageDescriptor describes an abstract protobuf message type. // // • A Message is a concrete message instance. Generated messages implement // ProtoMessage, which can convert to/from a Message. // // // ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐ // │ V │ V // ╔═══════════════╗ ╔═════════════════════════╗ ╔═════════════════════╗ // ║ ExtensionType ║ ║ ExtensionTypeDescriptor ║ ║ ExtensionDescriptor ║ // ╚═══════════════╝ ╚═════════════════════════╝ ╚═════════════════════╝ // Λ │ │ Λ │ Λ // └─────── Type() ───────┘ │ └─── may implement ────┘ │ // │ │ // └────── implements ────────┘ // // • An ExtensionType describes a concrete Go implementation of an extension. // It has an ExtensionTypeDescriptor and can convert to/from // abstract Values and Go values. // // • An ExtensionTypeDescriptor is an ExtensionDescriptor // which also has an ExtensionType. // // • An ExtensionDescriptor describes an abstract protobuf extension field and // may not always be an ExtensionTypeDescriptor. package protoreflect import ( "fmt" "strings" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/pragma" ) type doNotImplement pragma.DoNotImplement // ProtoMessage is the top-level interface that all proto messages implement. // This is declared in the protoreflect package to avoid a cyclic dependency; // use the proto.Message type instead, which aliases this type. type ProtoMessage interface{ ProtoReflect() Message } // Syntax is the language version of the proto file. type Syntax syntax type syntax int8 // keep exact type opaque as the int type may change const ( Proto2 Syntax = 2 Proto3 Syntax = 3 ) // IsValid reports whether the syntax is valid. func (s Syntax) IsValid() bool { switch s { case Proto2, Proto3: return true default: return false } } // String returns s as a proto source identifier (e.g., "proto2"). func (s Syntax) String() string { switch s { case Proto2: return "proto2" case Proto3: return "proto3" default: return fmt.Sprintf("<unknown:%d>", s) } } // GoString returns s as a Go source identifier (e.g., "Proto2"). func (s Syntax) GoString() string { switch s { case Proto2: return "Proto2" case Proto3: return "Proto3" default: return fmt.Sprintf("Syntax(%d)", s) } } // Cardinality determines whether a field is optional, required, or repeated. type Cardinality cardinality type cardinality int8 // keep exact type opaque as the int type may change // Constants as defined by the google.protobuf.Cardinality enumeration. const ( Optional Cardinality = 1 // appears zero or one times Required Cardinality = 2 // appears exactly one time; invalid with Proto3 Repeated Cardinality = 3 // appears zero or more times ) // IsValid reports whether the cardinality is valid. func (c Cardinality) IsValid() bool { switch c { case Optional, Required, Repeated: return true default: return false } } // String returns c as a proto source identifier (e.g., "optional"). func (c Cardinality) String() string { switch c { case Optional: return "optional" case Required: return "required" case Repeated: return "repeated" default: return fmt.Sprintf("<unknown:%d>", c) } } // GoString returns c as a Go source identifier (e.g., "Optional"). func (c Cardinality) GoString() string { switch c { case Optional: return "Optional" case Required: return "Required" case Repeated: return "Repeated" default: return fmt.Sprintf("Cardinality(%d)", c) } } // Kind indicates the basic proto kind of a field. type Kind kind type kind int8 // keep exact type opaque as the int type may change // Constants as defined by the google.protobuf.Field.Kind enumeration. const ( BoolKind Kind = 8 EnumKind Kind = 14 Int32Kind Kind = 5 Sint32Kind Kind = 17 Uint32Kind Kind = 13 Int64Kind Kind = 3 Sint64Kind Kind = 18 Uint64Kind Kind = 4 Sfixed32Kind Kind = 15 Fixed32Kind Kind = 7 FloatKind Kind = 2 Sfixed64Kind Kind = 16 Fixed64Kind Kind = 6 DoubleKind Kind = 1 StringKind Kind = 9 BytesKind Kind = 12 MessageKind Kind = 11 GroupKind Kind = 10 ) // IsValid reports whether the kind is valid. func (k Kind) IsValid() bool { switch k { case BoolKind, EnumKind, Int32Kind, Sint32Kind, Uint32Kind, Int64Kind, Sint64Kind, Uint64Kind, Sfixed32Kind, Fixed32Kind, FloatKind, Sfixed64Kind, Fixed64Kind, DoubleKind, StringKind, BytesKind, MessageKind, GroupKind: return true default: return false } } // String returns k as a proto source identifier (e.g., "bool"). func (k Kind) String() string { switch k { case BoolKind: return "bool" case EnumKind: return "enum" case Int32Kind: return "int32" case Sint32Kind: return "sint32" case Uint32Kind: return "uint32" case Int64Kind: return "int64" case Sint64Kind: return "sint64" case Uint64Kind: return "uint64" case Sfixed32Kind: return "sfixed32" case Fixed32Kind: return "fixed32" case FloatKind: return "float" case Sfixed64Kind: return "sfixed64" case Fixed64Kind: return "fixed64" case DoubleKind: return "double" case StringKind: return "string" case BytesKind: return "bytes" case MessageKind: return "message" case GroupKind: return "group" default: return fmt.Sprintf("<unknown:%d>", k) } } // GoString returns k as a Go source identifier (e.g., "BoolKind"). func (k Kind) GoString() string { switch k { case BoolKind: return "BoolKind" case EnumKind: return "EnumKind" case Int32Kind: return "Int32Kind" case Sint32Kind: return "Sint32Kind" case Uint32Kind: return "Uint32Kind" case Int64Kind: return "Int64Kind" case Sint64Kind: return "Sint64Kind" case Uint64Kind: return "Uint64Kind" case Sfixed32Kind: return "Sfixed32Kind" case Fixed32Kind: return "Fixed32Kind" case FloatKind: return "FloatKind" case Sfixed64Kind: return "Sfixed64Kind" case Fixed64Kind: return "Fixed64Kind" case DoubleKind: return "DoubleKind" case StringKind: return "StringKind" case BytesKind: return "BytesKind" case MessageKind: return "MessageKind" case GroupKind: return "GroupKind" default: return fmt.Sprintf("Kind(%d)", k) } } // FieldNumber is the field number in a message. type FieldNumber = protowire.Number // FieldNumbers represent a list of field numbers. type FieldNumbers interface { // Len reports the number of fields in the list. Len() int // Get returns the ith field number. It panics if out of bounds. Get(i int) FieldNumber // Has reports whether n is within the list of fields. Has(n FieldNumber) bool doNotImplement } // FieldRanges represent a list of field number ranges. type FieldRanges interface { // Len reports the number of ranges in the list. Len() int // Get returns the ith range. It panics if out of bounds. Get(i int) [2]FieldNumber // start inclusive; end exclusive // Has reports whether n is within any of the ranges. Has(n FieldNumber) bool doNotImplement } // EnumNumber is the numeric value for an enum. type EnumNumber int32 // EnumRanges represent a list of enum number ranges. type EnumRanges interface { // Len reports the number of ranges in the list. Len() int // Get returns the ith range. It panics if out of bounds. Get(i int) [2]EnumNumber // start inclusive; end inclusive // Has reports whether n is within any of the ranges. Has(n EnumNumber) bool doNotImplement } // Name is the short name for a proto declaration. This is not the name // as used in Go source code, which might not be identical to the proto name. type Name string // e.g., "Kind" // IsValid reports whether s is a syntactically valid name. // An empty name is invalid. func (s Name) IsValid() bool { return consumeIdent(string(s)) == len(s) } // Names represent a list of names. type Names interface { // Len reports the number of names in the list. Len() int // Get returns the ith name. It panics if out of bounds. Get(i int) Name // Has reports whether s matches any names in the list. Has(s Name) bool doNotImplement } // FullName is a qualified name that uniquely identifies a proto declaration. // A qualified name is the concatenation of the proto package along with the // fully-declared name (i.e., name of parent preceding the name of the child), // with a '.' delimiter placed between each Name. // // This should not have any leading or trailing dots. type FullName string // e.g., "google.protobuf.Field.Kind" // IsValid reports whether s is a syntactically valid full name. // An empty full name is invalid. func (s FullName) IsValid() bool { i := consumeIdent(string(s)) if i < 0 { return false } for len(s) > i { if s[i] != '.' { return false } i++ n := consumeIdent(string(s[i:])) if n < 0 { return false } i += n } return true } func consumeIdent(s string) (i int) { if len(s) == 0 || !isLetter(s[i]) { return -1 } i++ for len(s) > i && isLetterDigit(s[i]) { i++ } return i } func isLetter(c byte) bool { return c == '_' || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') } func isLetterDigit(c byte) bool { return isLetter(c) || ('0' <= c && c <= '9') } // Name returns the short name, which is the last identifier segment. // A single segment FullName is the Name itself. func (n FullName) Name() Name { if i := strings.LastIndexByte(string(n), '.'); i >= 0 { return Name(n[i+1:]) } return Name(n) } // Parent returns the full name with the trailing identifier removed. // A single segment FullName has no parent. func (n FullName) Parent() FullName { if i := strings.LastIndexByte(string(n), '.'); i >= 0 { return n[:i] } return "" } // Append returns the qualified name appended with the provided short name. // // Invariant: n == n.Parent().Append(n.Name()) // assuming n is valid func (n FullName) Append(s Name) FullName { if n == "" { return FullName(s) } return n + "." + FullName(s) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go
// 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 protoreflect import ( "strconv" ) // SourceLocations is a list of source locations. type SourceLocations interface { // Len reports the number of source locations in the proto file. Len() int // Get returns the ith SourceLocation. It panics if out of bounds. Get(int) SourceLocation // ByPath returns the SourceLocation for the given path, // returning the first location if multiple exist for the same path. // If multiple locations exist for the same path, // then SourceLocation.Next index can be used to identify the // index of the next SourceLocation. // If no location exists for this path, it returns the zero value. ByPath(path SourcePath) SourceLocation // ByDescriptor returns the SourceLocation for the given descriptor, // returning the first location if multiple exist for the same path. // If no location exists for this descriptor, it returns the zero value. ByDescriptor(desc Descriptor) SourceLocation doNotImplement } // SourceLocation describes a source location and // corresponds with the google.protobuf.SourceCodeInfo.Location message. type SourceLocation struct { // Path is the path to the declaration from the root file descriptor. // The contents of this slice must not be mutated. Path SourcePath // StartLine and StartColumn are the zero-indexed starting location // in the source file for the declaration. StartLine, StartColumn int // EndLine and EndColumn are the zero-indexed ending location // in the source file for the declaration. // In the descriptor.proto, the end line may be omitted if it is identical // to the start line. Here, it is always populated. EndLine, EndColumn int // LeadingDetachedComments are the leading detached comments // for the declaration. The contents of this slice must not be mutated. LeadingDetachedComments []string // LeadingComments is the leading attached comment for the declaration. LeadingComments string // TrailingComments is the trailing attached comment for the declaration. TrailingComments string // Next is an index into SourceLocations for the next source location that // has the same Path. It is zero if there is no next location. Next int } // SourcePath identifies part of a file descriptor for a source location. // The SourcePath is a sequence of either field numbers or indexes into // a repeated field that form a path starting from the root file descriptor. // // See google.protobuf.SourceCodeInfo.Location.path. type SourcePath []int32 // Equal reports whether p1 equals p2. func (p1 SourcePath) Equal(p2 SourcePath) bool { if len(p1) != len(p2) { return false } for i := range p1 { if p1[i] != p2[i] { return false } } return true } // String formats the path in a humanly readable manner. // The output is guaranteed to be deterministic, // making it suitable for use as a key into a Go map. // It is not guaranteed to be stable as the exact output could change // in a future version of this module. // // Example output: // .message_type[6].nested_type[15].field[3] func (p SourcePath) String() string { b := p.appendFileDescriptorProto(nil) for _, i := range p { b = append(b, '.') b = strconv.AppendInt(b, int64(i), 10) } return string(b) } type appendFunc func(*SourcePath, []byte) []byte func (p *SourcePath) appendSingularField(b []byte, name string, f appendFunc) []byte { if len(*p) == 0 { return b } b = append(b, '.') b = append(b, name...) *p = (*p)[1:] if f != nil { b = f(p, b) } return b } func (p *SourcePath) appendRepeatedField(b []byte, name string, f appendFunc) []byte { b = p.appendSingularField(b, name, nil) if len(*p) == 0 || (*p)[0] < 0 { return b } b = append(b, '[') b = strconv.AppendUint(b, uint64((*p)[0]), 10) b = append(b, ']') *p = (*p)[1:] if f != nil { b = f(p, b) } return b }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go
// 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 protoreflect import "google.golang.org/protobuf/encoding/protowire" // Enum is a reflection interface for a concrete enum value, // which provides type information and a getter for the enum number. // Enum does not provide a mutable API since enums are commonly backed by // Go constants, which are not addressable. type Enum interface { // Descriptor returns enum descriptor, which contains only the protobuf // type information for the enum. Descriptor() EnumDescriptor // Type returns the enum type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the enum descriptor be used instead. Type() EnumType // Number returns the enum value as an integer. Number() EnumNumber } // Message is a reflective interface for a concrete message value, // encapsulating both type and value information for the message. // // Accessor/mutators for individual fields are keyed by FieldDescriptor. // For non-extension fields, the descriptor must exactly match the // field known by the parent message. // For extension fields, the descriptor must implement ExtensionTypeDescriptor, // extend the parent message (i.e., have the same message FullName), and // be within the parent's extension range. // // Each field Value can be a scalar or a composite type (Message, List, or Map). // See Value for the Go types associated with a FieldDescriptor. // Providing a Value that is invalid or of an incorrect type panics. type Message interface { // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. Descriptor() MessageDescriptor // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. Type() MessageType // New returns a newly allocated and mutable empty message. New() Message // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. Interface() ProtoMessage // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. Range(f func(FieldDescriptor, Value) bool) // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. Has(FieldDescriptor) bool // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. Clear(FieldDescriptor) // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. Get(FieldDescriptor) Value // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. Set(FieldDescriptor, Value) // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. Mutable(FieldDescriptor) Value // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. NewField(FieldDescriptor) Value // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. WhichOneof(OneofDescriptor) FieldDescriptor // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. GetUnknown() RawFields // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. SetUnknown(RawFields) // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. IsValid() bool // ProtoMethods returns optional fast-path implementions of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. ProtoMethods() *methods } // RawFields is the raw bytes for an ordered sequence of fields. // Each field contains both the tag (representing field number and wire type), // and also the wire data itself. type RawFields []byte // IsValid reports whether b is syntactically correct wire format. func (b RawFields) IsValid() bool { for len(b) > 0 { _, _, n := protowire.ConsumeField(b) if n < 0 { return false } b = b[n:] } return true } // List is a zero-indexed, ordered list. // The element Value type is determined by FieldDescriptor.Kind. // Providing a Value that is invalid or of an incorrect type panics. type List interface { // Len reports the number of entries in the List. // Get, Set, and Truncate panic with out of bound indexes. Len() int // Get retrieves the value at the given index. // It never returns an invalid value. Get(int) Value // Set stores a value for the given index. // When setting a composite type, it is unspecified whether the set // value aliases the source's memory in any way. // // Set is a mutating operation and unsafe for concurrent use. Set(int, Value) // Append appends the provided value to the end of the list. // When appending a composite type, it is unspecified whether the appended // value aliases the source's memory in any way. // // Append is a mutating operation and unsafe for concurrent use. Append(Value) // AppendMutable appends a new, empty, mutable message value to the end // of the list and returns it. // It panics if the list does not contain a message type. AppendMutable() Value // Truncate truncates the list to a smaller length. // // Truncate is a mutating operation and unsafe for concurrent use. Truncate(int) // NewElement returns a new value for a list element. // For enums, this returns the first enum value. // For other scalars, this returns the zero value. // For messages, this returns a new, empty, mutable value. NewElement() Value // IsValid reports whether the list is valid. // // An invalid list is an empty, read-only value. // // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. IsValid() bool } // Map is an unordered, associative map. // The entry MapKey type is determined by FieldDescriptor.MapKey.Kind. // The entry Value type is determined by FieldDescriptor.MapValue.Kind. // Providing a MapKey or Value that is invalid or of an incorrect type panics. type Map interface { // Len reports the number of elements in the map. Len() int // Range iterates over every map entry in an undefined order, // calling f for each key and value encountered. // Range calls f Len times unless f returns false, which stops iteration. // While iterating, mutating operations may only be performed // on the current map key. Range(f func(MapKey, Value) bool) // Has reports whether an entry with the given key is in the map. Has(MapKey) bool // Clear clears the entry associated with they given key. // The operation does nothing if there is no entry associated with the key. // // Clear is a mutating operation and unsafe for concurrent use. Clear(MapKey) // Get retrieves the value for an entry with the given key. // It returns an invalid value for non-existent entries. Get(MapKey) Value // Set stores the value for an entry with the given key. // It panics when given a key or value that is invalid or the wrong type. // When setting a composite type, it is unspecified whether the set // value aliases the source's memory in any way. // // Set is a mutating operation and unsafe for concurrent use. Set(MapKey, Value) // Mutable retrieves a mutable reference to the entry for the given key. // If no entry exists for the key, it creates a new, empty, mutable value // and stores it as the entry for the key. // It panics if the map value is not a message. Mutable(MapKey) Value // NewValue returns a new value assignable as a map value. // For enums, this returns the first enum value. // For other scalars, this returns the zero value. // For messages, this returns a new, empty, mutable value. NewValue() Value // IsValid reports whether the map is valid. // // An invalid map is an empty, read-only value. // // An invalid message often corresponds to a nil Go map value, // but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. IsValid() bool }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
// 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 protoreflect import ( "google.golang.org/protobuf/internal/pragma" ) // The following types are used by the fast-path Message.ProtoMethods method. // // To avoid polluting the public protoreflect API with types used only by // low-level implementations, the canonical definitions of these types are // in the runtime/protoiface package. The definitions here and in protoiface // must be kept in sync. type ( methods = struct { pragma.NoUnkeyedLiterals Flags supportFlags Size func(sizeInput) sizeOutput Marshal func(marshalInput) (marshalOutput, error) Unmarshal func(unmarshalInput) (unmarshalOutput, error) Merge func(mergeInput) mergeOutput CheckInitialized func(checkInitializedInput) (checkInitializedOutput, error) } supportFlags = uint64 sizeInput = struct { pragma.NoUnkeyedLiterals Message Message Flags uint8 } sizeOutput = struct { pragma.NoUnkeyedLiterals Size int } marshalInput = struct { pragma.NoUnkeyedLiterals Message Message Buf []byte Flags uint8 } marshalOutput = struct { pragma.NoUnkeyedLiterals Buf []byte } unmarshalInput = struct { pragma.NoUnkeyedLiterals Message Message Buf []byte Flags uint8 Resolver interface { FindExtensionByName(field FullName) (ExtensionType, error) FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) } } unmarshalOutput = struct { pragma.NoUnkeyedLiterals Flags uint8 } mergeInput = struct { pragma.NoUnkeyedLiterals Source Message Destination Message } mergeOutput = struct { pragma.NoUnkeyedLiterals Flags uint8 } checkInitializedInput = struct { pragma.NoUnkeyedLiterals Message Message } checkInitializedOutput = struct { pragma.NoUnkeyedLiterals } )
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
// 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 protoiface contains types referenced or implemented by messages. // // WARNING: This package should only be imported by message implementations. // The functionality found in this package should be accessed through // higher-level abstractions provided by the proto package. package protoiface import ( "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" ) // Methods is a set of optional fast-path implementations of various operations. type Methods = struct { pragma.NoUnkeyedLiterals // Flags indicate support for optional features. Flags SupportFlags // Size returns the size in bytes of the wire-format encoding of a message. // Marshal must be provided if a custom Size is provided. Size func(SizeInput) SizeOutput // Marshal formats a message in the wire-format encoding to the provided buffer. // Size should be provided if a custom Marshal is provided. // It must not return an error for a partial message. Marshal func(MarshalInput) (MarshalOutput, error) // Unmarshal parses the wire-format encoding and merges the result into a message. // It must not reset the target message or return an error for a partial message. Unmarshal func(UnmarshalInput) (UnmarshalOutput, error) // Merge merges the contents of a source message into a destination message. Merge func(MergeInput) MergeOutput // CheckInitialized returns an error if any required fields in the message are not set. CheckInitialized func(CheckInitializedInput) (CheckInitializedOutput, error) } // SupportFlags indicate support for optional features. type SupportFlags = uint64 const ( // SupportMarshalDeterministic reports whether MarshalOptions.Deterministic is supported. SupportMarshalDeterministic SupportFlags = 1 << iota // SupportUnmarshalDiscardUnknown reports whether UnmarshalOptions.DiscardUnknown is supported. SupportUnmarshalDiscardUnknown ) // SizeInput is input to the Size method. type SizeInput = struct { pragma.NoUnkeyedLiterals Message protoreflect.Message Flags MarshalInputFlags } // SizeOutput is output from the Size method. type SizeOutput = struct { pragma.NoUnkeyedLiterals Size int } // MarshalInput is input to the Marshal method. type MarshalInput = struct { pragma.NoUnkeyedLiterals Message protoreflect.Message Buf []byte // output is appended to this buffer Flags MarshalInputFlags } // MarshalOutput is output from the Marshal method. type MarshalOutput = struct { pragma.NoUnkeyedLiterals Buf []byte // contains marshaled message } // MarshalInputFlags configure the marshaler. // Most flags correspond to fields in proto.MarshalOptions. type MarshalInputFlags = uint8 const ( MarshalDeterministic MarshalInputFlags = 1 << iota MarshalUseCachedSize ) // UnmarshalInput is input to the Unmarshal method. type UnmarshalInput = struct { pragma.NoUnkeyedLiterals Message protoreflect.Message Buf []byte // input buffer Flags UnmarshalInputFlags Resolver interface { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } } // UnmarshalOutput is output from the Unmarshal method. type UnmarshalOutput = struct { pragma.NoUnkeyedLiterals Flags UnmarshalOutputFlags } // UnmarshalInputFlags configure the unmarshaler. // Most flags correspond to fields in proto.UnmarshalOptions. type UnmarshalInputFlags = uint8 const ( UnmarshalDiscardUnknown UnmarshalInputFlags = 1 << iota ) // UnmarshalOutputFlags are output from the Unmarshal method. type UnmarshalOutputFlags = uint8 const ( // UnmarshalInitialized may be set on return if all required fields are known to be set. // If unset, then it does not necessarily indicate that the message is uninitialized, // only that its status could not be confirmed. UnmarshalInitialized UnmarshalOutputFlags = 1 << iota ) // MergeInput is input to the Merge method. type MergeInput = struct { pragma.NoUnkeyedLiterals Source protoreflect.Message Destination protoreflect.Message } // MergeOutput is output from the Merge method. type MergeOutput = struct { pragma.NoUnkeyedLiterals Flags MergeOutputFlags } // MergeOutputFlags are output from the Merge method. type MergeOutputFlags = uint8 const ( // MergeComplete reports whether the merge was performed. // If unset, the merger must have made no changes to the destination. MergeComplete MergeOutputFlags = 1 << iota ) // CheckInitializedInput is input to the CheckInitialized method. type CheckInitializedInput = struct { pragma.NoUnkeyedLiterals Message protoreflect.Message } // CheckInitializedOutput is output from the CheckInitialized method. type CheckInitializedOutput = struct { pragma.NoUnkeyedLiterals }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go
// 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 protoiface type MessageV1 interface { Reset() String() string ProtoMessage() } type ExtensionRangeV1 struct { Start, End int32 // both inclusive }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go
// 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 protoimpl contains the default implementation for messages // generated by protoc-gen-go. // // WARNING: This package should only ever be imported by generated messages. // The compatibility agreement covers nothing except for functionality needed // to keep existing generated messages operational. Breakages that occur due // to unauthorized usages of this package are not the author's responsibility. package protoimpl import ( "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/filetype" "google.golang.org/protobuf/internal/impl" ) // UnsafeEnabled specifies whether package unsafe can be used. const UnsafeEnabled = impl.UnsafeEnabled type ( // Types used by generated code in init functions. DescBuilder = filedesc.Builder TypeBuilder = filetype.Builder // Types used by generated code to implement EnumType, MessageType, and ExtensionType. EnumInfo = impl.EnumInfo MessageInfo = impl.MessageInfo ExtensionInfo = impl.ExtensionInfo // Types embedded in generated messages. MessageState = impl.MessageState SizeCache = impl.SizeCache WeakFields = impl.WeakFields UnknownFields = impl.UnknownFields ExtensionFields = impl.ExtensionFields ExtensionFieldV1 = impl.ExtensionField Pointer = impl.Pointer ) var X impl.Export
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go
// 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 protoimpl import ( "google.golang.org/protobuf/internal/version" ) const ( // MaxVersion is the maximum supported version for generated .pb.go files. // It is always the current version of the module. MaxVersion = version.Minor // GenVersion is the runtime version required by generated .pb.go files. // This is incremented when generated code relies on new functionality // in the runtime. GenVersion = 20 // MinVersion is the minimum supported version for generated .pb.go files. // This is incremented when the runtime drops support for old code. MinVersion = 0 ) // EnforceVersion is used by code generated by protoc-gen-go // to statically enforce minimum and maximum versions of this package. // A compilation failure implies either that: // * the runtime package is too old and needs to be updated OR // * the generated code is too old and needs to be regenerated. // // The runtime package can be upgraded by running: // go get google.golang.org/protobuf // // The generated code can be regenerated by running: // protoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES} // // Example usage by generated code: // const ( // // Verify that this generated code is sufficiently up-to-date. // _ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion) // // Verify that runtime/protoimpl is sufficiently up-to-date. // _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - genVersion) // ) // // The genVersion is the current minor version used to generated the code. // This compile-time check relies on negative integer overflow of a uint // being a compilation failure (guaranteed by the Go specification). type EnforceVersion uint // This enforces the following invariant: // MinVersion ≤ GenVersion ≤ MaxVersion const ( _ = EnforceVersion(GenVersion - MinVersion) _ = EnforceVersion(MaxVersion - GenVersion) )
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/types
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
// 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. // Author: [email protected] (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // The messages in this file describe the definitions found in .proto files. // A valid .proto file can be translated directly to a FileDescriptorProto // without any other information (e.g. without reading its imports). // Code generated by protoc-gen-go. DO NOT EDIT. // source: google/protobuf/descriptor.proto package descriptorpb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) type FieldDescriptorProto_Type int32 const ( // 0 is reserved for errors. // Order is weird for historical reasons. FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // negative values are likely. FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // negative values are likely. FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 // Tag-delimited aggregate. // Group type is deprecated and not supported in proto3. However, Proto3 // implementations should still be able to parse the group wire format and // treat group fields as unknown fields. FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 // Length-delimited aggregate. // New in version 2. FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 // Uses ZigZag encoding. FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 // Uses ZigZag encoding. ) // Enum value maps for FieldDescriptorProto_Type. var ( FieldDescriptorProto_Type_name = map[int32]string{ 1: "TYPE_DOUBLE", 2: "TYPE_FLOAT", 3: "TYPE_INT64", 4: "TYPE_UINT64", 5: "TYPE_INT32", 6: "TYPE_FIXED64", 7: "TYPE_FIXED32", 8: "TYPE_BOOL", 9: "TYPE_STRING", 10: "TYPE_GROUP", 11: "TYPE_MESSAGE", 12: "TYPE_BYTES", 13: "TYPE_UINT32", 14: "TYPE_ENUM", 15: "TYPE_SFIXED32", 16: "TYPE_SFIXED64", 17: "TYPE_SINT32", 18: "TYPE_SINT64", } FieldDescriptorProto_Type_value = map[string]int32{ "TYPE_DOUBLE": 1, "TYPE_FLOAT": 2, "TYPE_INT64": 3, "TYPE_UINT64": 4, "TYPE_INT32": 5, "TYPE_FIXED64": 6, "TYPE_FIXED32": 7, "TYPE_BOOL": 8, "TYPE_STRING": 9, "TYPE_GROUP": 10, "TYPE_MESSAGE": 11, "TYPE_BYTES": 12, "TYPE_UINT32": 13, "TYPE_ENUM": 14, "TYPE_SFIXED32": 15, "TYPE_SFIXED64": 16, "TYPE_SINT32": 17, "TYPE_SINT64": 18, } ) func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { p := new(FieldDescriptorProto_Type) *p = x return p } func (x FieldDescriptorProto_Type) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor { return file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor() } func (FieldDescriptorProto_Type) Type() protoreflect.EnumType { return &file_google_protobuf_descriptor_proto_enumTypes[0] } func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *FieldDescriptorProto_Type) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = FieldDescriptorProto_Type(num) return nil } // Deprecated: Use FieldDescriptorProto_Type.Descriptor instead. func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 0} } type FieldDescriptorProto_Label int32 const ( // 0 is reserved for errors FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 ) // Enum value maps for FieldDescriptorProto_Label. var ( FieldDescriptorProto_Label_name = map[int32]string{ 1: "LABEL_OPTIONAL", 2: "LABEL_REQUIRED", 3: "LABEL_REPEATED", } FieldDescriptorProto_Label_value = map[string]int32{ "LABEL_OPTIONAL": 1, "LABEL_REQUIRED": 2, "LABEL_REPEATED": 3, } ) func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { p := new(FieldDescriptorProto_Label) *p = x return p } func (x FieldDescriptorProto_Label) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor { return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor() } func (FieldDescriptorProto_Label) Type() protoreflect.EnumType { return &file_google_protobuf_descriptor_proto_enumTypes[1] } func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *FieldDescriptorProto_Label) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = FieldDescriptorProto_Label(num) return nil } // Deprecated: Use FieldDescriptorProto_Label.Descriptor instead. func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 1} } // Generated classes can be optimized for speed or code size. type FileOptions_OptimizeMode int32 const ( FileOptions_SPEED FileOptions_OptimizeMode = 1 // Generate complete code for parsing, serialization, // etc. FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 // Use ReflectionOps to implement these methods. FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 // Generate code using MessageLite and the lite runtime. ) // Enum value maps for FileOptions_OptimizeMode. var ( FileOptions_OptimizeMode_name = map[int32]string{ 1: "SPEED", 2: "CODE_SIZE", 3: "LITE_RUNTIME", } FileOptions_OptimizeMode_value = map[string]int32{ "SPEED": 1, "CODE_SIZE": 2, "LITE_RUNTIME": 3, } ) func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { p := new(FileOptions_OptimizeMode) *p = x return p } func (x FileOptions_OptimizeMode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor { return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor() } func (FileOptions_OptimizeMode) Type() protoreflect.EnumType { return &file_google_protobuf_descriptor_proto_enumTypes[2] } func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *FileOptions_OptimizeMode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = FileOptions_OptimizeMode(num) return nil } // Deprecated: Use FileOptions_OptimizeMode.Descriptor instead. func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10, 0} } type FieldOptions_CType int32 const ( // Default mode. FieldOptions_STRING FieldOptions_CType = 0 FieldOptions_CORD FieldOptions_CType = 1 FieldOptions_STRING_PIECE FieldOptions_CType = 2 ) // Enum value maps for FieldOptions_CType. var ( FieldOptions_CType_name = map[int32]string{ 0: "STRING", 1: "CORD", 2: "STRING_PIECE", } FieldOptions_CType_value = map[string]int32{ "STRING": 0, "CORD": 1, "STRING_PIECE": 2, } ) func (x FieldOptions_CType) Enum() *FieldOptions_CType { p := new(FieldOptions_CType) *p = x return p } func (x FieldOptions_CType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor { return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor() } func (FieldOptions_CType) Type() protoreflect.EnumType { return &file_google_protobuf_descriptor_proto_enumTypes[3] } func (x FieldOptions_CType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *FieldOptions_CType) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = FieldOptions_CType(num) return nil } // Deprecated: Use FieldOptions_CType.Descriptor instead. func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0} } type FieldOptions_JSType int32 const ( // Use the default type. FieldOptions_JS_NORMAL FieldOptions_JSType = 0 // Use JavaScript strings. FieldOptions_JS_STRING FieldOptions_JSType = 1 // Use JavaScript numbers. FieldOptions_JS_NUMBER FieldOptions_JSType = 2 ) // Enum value maps for FieldOptions_JSType. var ( FieldOptions_JSType_name = map[int32]string{ 0: "JS_NORMAL", 1: "JS_STRING", 2: "JS_NUMBER", } FieldOptions_JSType_value = map[string]int32{ "JS_NORMAL": 0, "JS_STRING": 1, "JS_NUMBER": 2, } ) func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { p := new(FieldOptions_JSType) *p = x return p } func (x FieldOptions_JSType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor { return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor() } func (FieldOptions_JSType) Type() protoreflect.EnumType { return &file_google_protobuf_descriptor_proto_enumTypes[4] } func (x FieldOptions_JSType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *FieldOptions_JSType) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = FieldOptions_JSType(num) return nil } // Deprecated: Use FieldOptions_JSType.Descriptor instead. func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} } // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // or neither? HTTP based RPC implementation may choose GET verb for safe // methods, and PUT verb for idempotent methods instead of the default POST. type MethodOptions_IdempotencyLevel int32 const ( MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 // implies idempotent MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 // idempotent, but may have side effects ) // Enum value maps for MethodOptions_IdempotencyLevel. var ( MethodOptions_IdempotencyLevel_name = map[int32]string{ 0: "IDEMPOTENCY_UNKNOWN", 1: "NO_SIDE_EFFECTS", 2: "IDEMPOTENT", } MethodOptions_IdempotencyLevel_value = map[string]int32{ "IDEMPOTENCY_UNKNOWN": 0, "NO_SIDE_EFFECTS": 1, "IDEMPOTENT": 2, } ) func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { p := new(MethodOptions_IdempotencyLevel) *p = x return p } func (x MethodOptions_IdempotencyLevel) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor { return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor() } func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType { return &file_google_protobuf_descriptor_proto_enumTypes[5] } func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MethodOptions_IdempotencyLevel(num) return nil } // Deprecated: Use MethodOptions_IdempotencyLevel.Descriptor instead. func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0} } // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. type FileDescriptorSet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` } func (x *FileDescriptorSet) Reset() { *x = FileDescriptorSet{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FileDescriptorSet) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileDescriptorSet) ProtoMessage() {} func (x *FileDescriptorSet) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileDescriptorSet.ProtoReflect.Descriptor instead. func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0} } func (x *FileDescriptorSet) GetFile() []*FileDescriptorProto { if x != nil { return x.File } return nil } // Describes a complete .proto file. type FileDescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` // Indexes of the public imported files in the dependency list above. PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` // Indexes of the weak imported files in the dependency list. // For Google-internal migration only. Do not use. WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` // All top-level definitions in this file. MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` // This field contains optional information about the original source code. // You may safely remove this entire field without harming runtime // functionality of the descriptors -- the information is needed only by // development tools. SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` // The syntax of the proto file. // The supported values are "proto2" and "proto3". Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` } func (x *FileDescriptorProto) Reset() { *x = FileDescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FileDescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileDescriptorProto) ProtoMessage() {} func (x *FileDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileDescriptorProto.ProtoReflect.Descriptor instead. func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1} } func (x *FileDescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FileDescriptorProto) GetPackage() string { if x != nil && x.Package != nil { return *x.Package } return "" } func (x *FileDescriptorProto) GetDependency() []string { if x != nil { return x.Dependency } return nil } func (x *FileDescriptorProto) GetPublicDependency() []int32 { if x != nil { return x.PublicDependency } return nil } func (x *FileDescriptorProto) GetWeakDependency() []int32 { if x != nil { return x.WeakDependency } return nil } func (x *FileDescriptorProto) GetMessageType() []*DescriptorProto { if x != nil { return x.MessageType } return nil } func (x *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { if x != nil { return x.EnumType } return nil } func (x *FileDescriptorProto) GetService() []*ServiceDescriptorProto { if x != nil { return x.Service } return nil } func (x *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { if x != nil { return x.Extension } return nil } func (x *FileDescriptorProto) GetOptions() *FileOptions { if x != nil { return x.Options } return nil } func (x *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { if x != nil { return x.SourceCodeInfo } return nil } func (x *FileDescriptorProto) GetSyntax() string { if x != nil && x.Syntax != nil { return *x.Syntax } return "" } // Describes a message type. type DescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved field names, which may not be used by fields in the same message. // A given name may only be reserved once. ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` } func (x *DescriptorProto) Reset() { *x = DescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*DescriptorProto) ProtoMessage() {} func (x *DescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DescriptorProto.ProtoReflect.Descriptor instead. func (*DescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2} } func (x *DescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *DescriptorProto) GetField() []*FieldDescriptorProto { if x != nil { return x.Field } return nil } func (x *DescriptorProto) GetExtension() []*FieldDescriptorProto { if x != nil { return x.Extension } return nil } func (x *DescriptorProto) GetNestedType() []*DescriptorProto { if x != nil { return x.NestedType } return nil } func (x *DescriptorProto) GetEnumType() []*EnumDescriptorProto { if x != nil { return x.EnumType } return nil } func (x *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { if x != nil { return x.ExtensionRange } return nil } func (x *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { if x != nil { return x.OneofDecl } return nil } func (x *DescriptorProto) GetOptions() *MessageOptions { if x != nil { return x.Options } return nil } func (x *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { if x != nil { return x.ReservedRange } return nil } func (x *DescriptorProto) GetReservedName() []string { if x != nil { return x.ReservedName } return nil } type ExtensionRangeOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } func (x *ExtensionRangeOptions) Reset() { *x = ExtensionRangeOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ExtensionRangeOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*ExtensionRangeOptions) ProtoMessage() {} func (x *ExtensionRangeOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ExtensionRangeOptions.ProtoReflect.Descriptor instead. func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3} } func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } // Describes a field within a message. type FieldDescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` // If type_name is set, this need not be set. If both this and type_name // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` // For message and enum types, this is the name of the type. If the name // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping // rules are used to find the type (i.e. first the nested types within this // message are searched, then within the parent, on up to the root // namespace). TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` // For extensions, this is the name of the type being extended. It is // resolved in the same manner as type_name. Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` // For numeric types, contains the original text representation of the value. // For booleans, "true" or "false". // For strings, contains the default text contents (not escaped in any way). // For bytes, contains the C escaped value. All bytes >= 128 are escaped. // TODO(kenton): Base-64 encode? DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` // If set, gives the index of a oneof in the containing type's oneof_decl // list. This field is a member of that oneof. OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` // JSON name of this field. The value is set by protocol compiler. If the // user has set a "json_name" option on this field, that option's value // will be used. Otherwise, it's deduced from the field's name by converting // it to camelCase. JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` // If true, this is a proto3 "optional". When a proto3 field is optional, it // tracks presence regardless of field type. // // When proto3_optional is true, this field must be belong to a oneof to // signal to old proto3 clients that presence is tracked for this field. This // oneof is known as a "synthetic" oneof, and this field must be its sole // member (each proto3 optional field gets its own synthetic oneof). Synthetic // oneofs exist in the descriptor only, and do not generate any API. Synthetic // oneofs must be ordered after all "real" oneofs. // // For message fields, proto3_optional doesn't create any semantic change, // since non-repeated message fields always track presence. However it still // indicates the semantic detail of whether the user wrote "optional" or not. // This can be useful for round-tripping the .proto file. For consistency we // give message fields a synthetic oneof also, even though it is not required // to track presence. This is especially important because the parser can't // tell if a field is a message or an enum, so it must always create a // synthetic oneof. // // Proto2 optional fields do not set this flag, because they already indicate // optional with `LABEL_OPTIONAL`. Proto3Optional *bool `protobuf:"varint,17,opt,name=proto3_optional,json=proto3Optional" json:"proto3_optional,omitempty"` } func (x *FieldDescriptorProto) Reset() { *x = FieldDescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FieldDescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*FieldDescriptorProto) ProtoMessage() {} func (x *FieldDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FieldDescriptorProto.ProtoReflect.Descriptor instead. func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4} } func (x *FieldDescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FieldDescriptorProto) GetNumber() int32 { if x != nil && x.Number != nil { return *x.Number } return 0 } func (x *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { if x != nil && x.Label != nil { return *x.Label } return FieldDescriptorProto_LABEL_OPTIONAL } func (x *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { if x != nil && x.Type != nil { return *x.Type } return FieldDescriptorProto_TYPE_DOUBLE } func (x *FieldDescriptorProto) GetTypeName() string { if x != nil && x.TypeName != nil { return *x.TypeName } return "" } func (x *FieldDescriptorProto) GetExtendee() string { if x != nil && x.Extendee != nil { return *x.Extendee } return "" } func (x *FieldDescriptorProto) GetDefaultValue() string { if x != nil && x.DefaultValue != nil { return *x.DefaultValue } return "" } func (x *FieldDescriptorProto) GetOneofIndex() int32 { if x != nil && x.OneofIndex != nil { return *x.OneofIndex } return 0 } func (x *FieldDescriptorProto) GetJsonName() string { if x != nil && x.JsonName != nil { return *x.JsonName } return "" } func (x *FieldDescriptorProto) GetOptions() *FieldOptions { if x != nil { return x.Options } return nil } func (x *FieldDescriptorProto) GetProto3Optional() bool { if x != nil && x.Proto3Optional != nil { return *x.Proto3Optional } return false } // Describes a oneof. type OneofDescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` } func (x *OneofDescriptorProto) Reset() { *x = OneofDescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneofDescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneofDescriptorProto) ProtoMessage() {} func (x *OneofDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneofDescriptorProto.ProtoReflect.Descriptor instead. func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{5} } func (x *OneofDescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *OneofDescriptorProto) GetOptions() *OneofOptions { if x != nil { return x.Options } return nil } // Describes an enum type. type EnumDescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` // Range of reserved numeric values. Reserved numeric values may not be used // by enum values in the same enum declaration. Reserved ranges may not // overlap. ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved enum value names, which may not be reused. A given name may only // be reserved once. ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` } func (x *EnumDescriptorProto) Reset() { *x = EnumDescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumDescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumDescriptorProto) ProtoMessage() {} func (x *EnumDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumDescriptorProto.ProtoReflect.Descriptor instead. func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6} } func (x *EnumDescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { if x != nil { return x.Value } return nil } func (x *EnumDescriptorProto) GetOptions() *EnumOptions { if x != nil { return x.Options } return nil } func (x *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { if x != nil { return x.ReservedRange } return nil } func (x *EnumDescriptorProto) GetReservedName() []string { if x != nil { return x.ReservedName } return nil } // Describes a value within an enum. type EnumValueDescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` } func (x *EnumValueDescriptorProto) Reset() { *x = EnumValueDescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumValueDescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumValueDescriptorProto) ProtoMessage() {} func (x *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumValueDescriptorProto.ProtoReflect.Descriptor instead. func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{7} } func (x *EnumValueDescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *EnumValueDescriptorProto) GetNumber() int32 { if x != nil && x.Number != nil { return *x.Number } return 0 } func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { if x != nil { return x.Options } return nil } // Describes a service. type ServiceDescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` } func (x *ServiceDescriptorProto) Reset() { *x = ServiceDescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ServiceDescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*ServiceDescriptorProto) ProtoMessage() {} func (x *ServiceDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ServiceDescriptorProto.ProtoReflect.Descriptor instead. func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{8} } func (x *ServiceDescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { if x != nil { return x.Method } return nil } func (x *ServiceDescriptorProto) GetOptions() *ServiceOptions { if x != nil { return x.Options } return nil } // Describes a method of a service. type MethodDescriptorProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Input and output type names. These are resolved in the same way as // FieldDescriptorProto.type_name, but must refer to a message type. InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` // Identifies if client streams multiple client messages ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` // Identifies if server streams multiple server messages ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` } // Default values for MethodDescriptorProto fields. const ( Default_MethodDescriptorProto_ClientStreaming = bool(false) Default_MethodDescriptorProto_ServerStreaming = bool(false) ) func (x *MethodDescriptorProto) Reset() { *x = MethodDescriptorProto{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MethodDescriptorProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*MethodDescriptorProto) ProtoMessage() {} func (x *MethodDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MethodDescriptorProto.ProtoReflect.Descriptor instead. func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{9} } func (x *MethodDescriptorProto) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *MethodDescriptorProto) GetInputType() string { if x != nil && x.InputType != nil { return *x.InputType } return "" } func (x *MethodDescriptorProto) GetOutputType() string { if x != nil && x.OutputType != nil { return *x.OutputType } return "" } func (x *MethodDescriptorProto) GetOptions() *MethodOptions { if x != nil { return x.Options } return nil } func (x *MethodDescriptorProto) GetClientStreaming() bool { if x != nil && x.ClientStreaming != nil { return *x.ClientStreaming } return Default_MethodDescriptorProto_ClientStreaming } func (x *MethodDescriptorProto) GetServerStreaming() bool { if x != nil && x.ServerStreaming != nil { return *x.ServerStreaming } return Default_MethodDescriptorProto_ServerStreaming } type FileOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // Sets the Java package where classes generated from this .proto will be // placed. By default, the proto package is used, but this is often // inappropriate because proto packages do not normally start with backwards // domain names. JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` // If set, all the classes from the .proto file are wrapped in a single // outer class with the given name. This applies to both Proto1 // (equivalent to the old "--one_java_file" option) and Proto2 (where // a .proto always translates to a single class, but you may want to // explicitly choose the class name). JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` // If set true, then the Java code generator will generate a separate .java // file for each top-level message, enum, and service defined in the .proto // file. Thus, these types will *not* be nested inside the outer class // named by java_outer_classname. However, the outer class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` // This option does nothing. // // Deprecated: Do not use. JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // If set true, then the Java2 code generator will generate code that // throws an exception whenever an attempt is made to assign a non-UTF-8 // byte sequence to a string field. // Message reflection will do the same. // However, an extension field still accepts non-UTF-8 byte sequences. // This option has no effect on when used with the lite runtime. JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` // Sets the Go package where structs generated from this .proto will be // placed. If omitted, the Go package will be derived from the following: // - The basename of the package import path, if provided. // - Otherwise, the package statement in the .proto file, if present. // - Otherwise, the basename of the .proto file, without extension. GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). // Generic services were the only kind of service generation supported by // early versions of google.protobuf. // // Generic services are now considered deprecated in favor of using plugins // that generate code specific to your particular RPC system. Therefore, // these default to false. Old code which depends on generic services should // explicitly set them to true. CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very // least, this is a formalization for deprecating files. Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // Enables the use of arenas for the proto messages in this file. This applies // only to generated classes for C++. CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=1" json:"cc_enable_arenas,omitempty"` // Sets the objective c class prefix which is prepended to all objective c // generated classes from this .proto. There is no default. ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` // Namespace for generated classes; defaults to the package. CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` // By default Swift generators will take the proto package and CamelCase it // replacing '.' with underscore and use that to prefix the types/symbols // defined. When this options is provided, they will use this value instead // to prefix the types/symbols defined. SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` // Sets the php class prefix which is prepended to all php generated classes // from this .proto. Default is empty. PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` // Use this option to change the namespace of php generated classes. Default // is empty. When this option is empty, the package name will be used for // determining the namespace. PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` // Use this option to change the namespace of php generated metadata classes. // Default is empty. When this option is empty, the proto file name will be // used for determining the namespace. PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"` // Use this option to change the package of ruby generated classes. Default // is empty. When this option is not set, the package name will be used for // determining the ruby package. RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"` // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for FileOptions fields. const ( Default_FileOptions_JavaMultipleFiles = bool(false) Default_FileOptions_JavaStringCheckUtf8 = bool(false) Default_FileOptions_OptimizeFor = FileOptions_SPEED Default_FileOptions_CcGenericServices = bool(false) Default_FileOptions_JavaGenericServices = bool(false) Default_FileOptions_PyGenericServices = bool(false) Default_FileOptions_PhpGenericServices = bool(false) Default_FileOptions_Deprecated = bool(false) Default_FileOptions_CcEnableArenas = bool(true) ) func (x *FileOptions) Reset() { *x = FileOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FileOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileOptions) ProtoMessage() {} func (x *FileOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileOptions.ProtoReflect.Descriptor instead. func (*FileOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10} } func (x *FileOptions) GetJavaPackage() string { if x != nil && x.JavaPackage != nil { return *x.JavaPackage } return "" } func (x *FileOptions) GetJavaOuterClassname() string { if x != nil && x.JavaOuterClassname != nil { return *x.JavaOuterClassname } return "" } func (x *FileOptions) GetJavaMultipleFiles() bool { if x != nil && x.JavaMultipleFiles != nil { return *x.JavaMultipleFiles } return Default_FileOptions_JavaMultipleFiles } // Deprecated: Do not use. func (x *FileOptions) GetJavaGenerateEqualsAndHash() bool { if x != nil && x.JavaGenerateEqualsAndHash != nil { return *x.JavaGenerateEqualsAndHash } return false } func (x *FileOptions) GetJavaStringCheckUtf8() bool { if x != nil && x.JavaStringCheckUtf8 != nil { return *x.JavaStringCheckUtf8 } return Default_FileOptions_JavaStringCheckUtf8 } func (x *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { if x != nil && x.OptimizeFor != nil { return *x.OptimizeFor } return Default_FileOptions_OptimizeFor } func (x *FileOptions) GetGoPackage() string { if x != nil && x.GoPackage != nil { return *x.GoPackage } return "" } func (x *FileOptions) GetCcGenericServices() bool { if x != nil && x.CcGenericServices != nil { return *x.CcGenericServices } return Default_FileOptions_CcGenericServices } func (x *FileOptions) GetJavaGenericServices() bool { if x != nil && x.JavaGenericServices != nil { return *x.JavaGenericServices } return Default_FileOptions_JavaGenericServices } func (x *FileOptions) GetPyGenericServices() bool { if x != nil && x.PyGenericServices != nil { return *x.PyGenericServices } return Default_FileOptions_PyGenericServices } func (x *FileOptions) GetPhpGenericServices() bool { if x != nil && x.PhpGenericServices != nil { return *x.PhpGenericServices } return Default_FileOptions_PhpGenericServices } func (x *FileOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated } return Default_FileOptions_Deprecated } func (x *FileOptions) GetCcEnableArenas() bool { if x != nil && x.CcEnableArenas != nil { return *x.CcEnableArenas } return Default_FileOptions_CcEnableArenas } func (x *FileOptions) GetObjcClassPrefix() string { if x != nil && x.ObjcClassPrefix != nil { return *x.ObjcClassPrefix } return "" } func (x *FileOptions) GetCsharpNamespace() string { if x != nil && x.CsharpNamespace != nil { return *x.CsharpNamespace } return "" } func (x *FileOptions) GetSwiftPrefix() string { if x != nil && x.SwiftPrefix != nil { return *x.SwiftPrefix } return "" } func (x *FileOptions) GetPhpClassPrefix() string { if x != nil && x.PhpClassPrefix != nil { return *x.PhpClassPrefix } return "" } func (x *FileOptions) GetPhpNamespace() string { if x != nil && x.PhpNamespace != nil { return *x.PhpNamespace } return "" } func (x *FileOptions) GetPhpMetadataNamespace() string { if x != nil && x.PhpMetadataNamespace != nil { return *x.PhpMetadataNamespace } return "" } func (x *FileOptions) GetRubyPackage() string { if x != nil && x.RubyPackage != nil { return *x.RubyPackage } return "" } func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } type MessageOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // Set true to use the old proto1 MessageSet wire format for extensions. // This is provided for backwards-compatibility with the MessageSet wire // format. You should not use this for any other reason: It's less // efficient, has fewer features, and is more complicated. // // The message must be defined exactly as follows: // message Foo { // option message_set_wire_format = true; // extensions 4 to max; // } // Note that the message cannot have any defined fields; MessageSets only // have extensions. // // All extensions of your type must be singular messages; e.g. they cannot // be int32s, enums, or repeated messages. // // Because this is an option, the above two restrictions are not enforced by // the protocol compiler. MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` // Disables the generation of the standard "descriptor()" accessor, which can // conflict with a field of the same name. This is meant to make migration // from proto1 easier; new code should avoid fields named "descriptor". NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` // Is this message deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // Whether the message is an automatically generated map entry type for the // maps field. // // For maps fields: // map<KeyType, ValueType> map_field = 1; // The parsed descriptor looks like: // message MapFieldEntry { // option map_entry = true; // optional KeyType key = 1; // optional ValueType value = 2; // } // repeated MapFieldEntry map_field = 1; // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax // instead. The option should only be implicitly set by the proto compiler // parser. MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for MessageOptions fields. const ( Default_MessageOptions_MessageSetWireFormat = bool(false) Default_MessageOptions_NoStandardDescriptorAccessor = bool(false) Default_MessageOptions_Deprecated = bool(false) ) func (x *MessageOptions) Reset() { *x = MessageOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MessageOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*MessageOptions) ProtoMessage() {} func (x *MessageOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead. func (*MessageOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{11} } func (x *MessageOptions) GetMessageSetWireFormat() bool { if x != nil && x.MessageSetWireFormat != nil { return *x.MessageSetWireFormat } return Default_MessageOptions_MessageSetWireFormat } func (x *MessageOptions) GetNoStandardDescriptorAccessor() bool { if x != nil && x.NoStandardDescriptorAccessor != nil { return *x.NoStandardDescriptorAccessor } return Default_MessageOptions_NoStandardDescriptorAccessor } func (x *MessageOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated } return Default_MessageOptions_Deprecated } func (x *MessageOptions) GetMapEntry() bool { if x != nil && x.MapEntry != nil { return *x.MapEntry } return false } func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } type FieldOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific // options below. This option is not yet implemented in the open source // release -- sorry, we'll try to include it in a future version! Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly // writing the tag and type for each element, the entire array is encoded as // a single length-delimited blob. In proto3, only explicit setting it to // false will avoid using packed encoding. Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` // The jstype option determines the JavaScript type used for values of the // field. The option is permitted only for 64 bit integral and fixed types // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING // is represented as JavaScript string, which avoids loss of precision that // can happen when a large value is converted to a floating point JavaScript. // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to // use the JavaScript "number" type. The behavior of the default option // JS_NORMAL is implementation dependent. // // This option is an enum to permit additional types to be added, e.g. // goog.math.Integer. Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` // Should this field be parsed lazily? Lazy applies only to message-type // fields. It means that when the outer message is initially parsed, the // inner message's contents will not be parsed but instead stored in encoded // form. The inner message will actually be parsed when it is first accessed. // // This is only a hint. Implementations are free to choose whether to use // eager or lazy parsing regardless of the value of this option. However, // setting this option true suggests that the protocol author believes that // using lazy parsing on this field is worth the additional bookkeeping // overhead typically needed to implement it. // // This option does not affect the public interface of any generated code; // all method signatures remain the same. Furthermore, thread-safety of the // interface is not affected by this option; const methods remain safe to // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. // // // Note that implementations may choose not to check required fields within // a lazy sub-message. That is, calling IsInitialized() on the outer message // may return true even if the inner message has missing required fields. // This is necessary because otherwise the inner message would have to be // parsed in order to perform the check, defeating the purpose of lazy // parsing. An implementation which chooses not to check required fields // must be consistent about it. That is, for any particular sub-message, the // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed. Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this // is a formalization for deprecating fields. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // For Google-internal migration only. Do not use. Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for FieldOptions fields. const ( Default_FieldOptions_Ctype = FieldOptions_STRING Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL Default_FieldOptions_Lazy = bool(false) Default_FieldOptions_Deprecated = bool(false) Default_FieldOptions_Weak = bool(false) ) func (x *FieldOptions) Reset() { *x = FieldOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FieldOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*FieldOptions) ProtoMessage() {} func (x *FieldOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead. func (*FieldOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12} } func (x *FieldOptions) GetCtype() FieldOptions_CType { if x != nil && x.Ctype != nil { return *x.Ctype } return Default_FieldOptions_Ctype } func (x *FieldOptions) GetPacked() bool { if x != nil && x.Packed != nil { return *x.Packed } return false } func (x *FieldOptions) GetJstype() FieldOptions_JSType { if x != nil && x.Jstype != nil { return *x.Jstype } return Default_FieldOptions_Jstype } func (x *FieldOptions) GetLazy() bool { if x != nil && x.Lazy != nil { return *x.Lazy } return Default_FieldOptions_Lazy } func (x *FieldOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated } return Default_FieldOptions_Deprecated } func (x *FieldOptions) GetWeak() bool { if x != nil && x.Weak != nil { return *x.Weak } return Default_FieldOptions_Weak } func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } type OneofOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } func (x *OneofOptions) Reset() { *x = OneofOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneofOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneofOptions) ProtoMessage() {} func (x *OneofOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneofOptions.ProtoReflect.Descriptor instead. func (*OneofOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13} } func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } type EnumOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // Set this option to true to allow mapping different tag names to the same // value. AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` // Is this enum deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for EnumOptions fields. const ( Default_EnumOptions_Deprecated = bool(false) ) func (x *EnumOptions) Reset() { *x = EnumOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumOptions) ProtoMessage() {} func (x *EnumOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead. func (*EnumOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{14} } func (x *EnumOptions) GetAllowAlias() bool { if x != nil && x.AllowAlias != nil { return *x.AllowAlias } return false } func (x *EnumOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated } return Default_EnumOptions_Deprecated } func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } type EnumValueOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // Is this enum value deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, // this is a formalization for deprecating enum values. Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for EnumValueOptions fields. const ( Default_EnumValueOptions_Deprecated = bool(false) ) func (x *EnumValueOptions) Reset() { *x = EnumValueOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumValueOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumValueOptions) ProtoMessage() {} func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead. func (*EnumValueOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{15} } func (x *EnumValueOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated } return Default_EnumValueOptions_Deprecated } func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } type ServiceOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // Is this service deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the service, or it will be completely ignored; in the very least, // this is a formalization for deprecating services. Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for ServiceOptions fields. const ( Default_ServiceOptions_Deprecated = bool(false) ) func (x *ServiceOptions) Reset() { *x = ServiceOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ServiceOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*ServiceOptions) ProtoMessage() {} func (x *ServiceOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ServiceOptions.ProtoReflect.Descriptor instead. func (*ServiceOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16} } func (x *ServiceOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated } return Default_ServiceOptions_Deprecated } func (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } type MethodOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // Is this method deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, // this is a formalization for deprecating methods. Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for MethodOptions fields. const ( Default_MethodOptions_Deprecated = bool(false) Default_MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN ) func (x *MethodOptions) Reset() { *x = MethodOptions{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MethodOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*MethodOptions) ProtoMessage() {} func (x *MethodOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead. func (*MethodOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17} } func (x *MethodOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated } return Default_MethodOptions_Deprecated } func (x *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { if x != nil && x.IdempotencyLevel != nil { return *x.IdempotencyLevel } return Default_MethodOptions_IdempotencyLevel } func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption } return nil } // A message representing a option the parser does not recognize. This only // appears in options protos created by the compiler::Parser class. // DescriptorPool resolves these when building Descriptor objects. Therefore, // options protos in descriptor objects (e.g. returned by Descriptor::options(), // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions // in them. type UninterpretedOption struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` // The value of the uninterpreted option, in whatever type the tokenizer // identified it as during parsing. Exactly one of these should be set. IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` } func (x *UninterpretedOption) Reset() { *x = UninterpretedOption{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UninterpretedOption) String() string { return protoimpl.X.MessageStringOf(x) } func (*UninterpretedOption) ProtoMessage() {} func (x *UninterpretedOption) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UninterpretedOption.ProtoReflect.Descriptor instead. func (*UninterpretedOption) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18} } func (x *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { if x != nil { return x.Name } return nil } func (x *UninterpretedOption) GetIdentifierValue() string { if x != nil && x.IdentifierValue != nil { return *x.IdentifierValue } return "" } func (x *UninterpretedOption) GetPositiveIntValue() uint64 { if x != nil && x.PositiveIntValue != nil { return *x.PositiveIntValue } return 0 } func (x *UninterpretedOption) GetNegativeIntValue() int64 { if x != nil && x.NegativeIntValue != nil { return *x.NegativeIntValue } return 0 } func (x *UninterpretedOption) GetDoubleValue() float64 { if x != nil && x.DoubleValue != nil { return *x.DoubleValue } return 0 } func (x *UninterpretedOption) GetStringValue() []byte { if x != nil { return x.StringValue } return nil } func (x *UninterpretedOption) GetAggregateValue() string { if x != nil && x.AggregateValue != nil { return *x.AggregateValue } return "" } // Encapsulates information about the original source file from which a // FileDescriptorProto was generated. type SourceCodeInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // A Location identifies a piece of source code in a .proto file which // corresponds to a particular definition. This information is intended // to be useful to IDEs, code indexers, documentation generators, and similar // tools. // // For example, say we have a file like: // message Foo { // optional string foo = 1; // } // Let's look at just the field definition: // optional string foo = 1; // ^ ^^ ^^ ^ ^^^ // a bc de f ghi // We have the following locations: // span path represents // [a,i) [ 4, 0, 2, 0 ] The whole field definition. // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). // // Notes: // - A location may refer to a repeated field itself (i.e. not to any // particular index within it). This is used whenever a set of elements are // logically enclosed in a single code segment. For example, an entire // extend block (possibly containing multiple extension definitions) will // have an outer location whose path refers to the "extensions" repeated // field without an index. // - Multiple locations may have the same path. This happens when a single // logical declaration is spread out across multiple places. The most // obvious example is the "extend" block again -- there may be multiple // extend blocks in the same scope, each of which will have the same path. // - A location's span is not always a subset of its parent's span. For // example, the "extendee" of an extension declaration appears at the // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span // does not mean that it is a descendant. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` } func (x *SourceCodeInfo) Reset() { *x = SourceCodeInfo{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SourceCodeInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*SourceCodeInfo) ProtoMessage() {} func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SourceCodeInfo.ProtoReflect.Descriptor instead. func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19} } func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { if x != nil { return x.Location } return nil } // Describes the relationship between generated code and its original source // file. A GeneratedCodeInfo message is associated with only one generated // source file, but may contain references to different source .proto files. type GeneratedCodeInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // An Annotation connects some span of text in generated code to an element // of its generating .proto file. Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` } func (x *GeneratedCodeInfo) Reset() { *x = GeneratedCodeInfo{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GeneratedCodeInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*GeneratedCodeInfo) ProtoMessage() {} func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GeneratedCodeInfo.ProtoReflect.Descriptor instead. func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20} } func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { if x != nil { return x.Annotation } return nil } type DescriptorProto_ExtensionRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` } func (x *DescriptorProto_ExtensionRange) Reset() { *x = DescriptorProto_ExtensionRange{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DescriptorProto_ExtensionRange) String() string { return protoimpl.X.MessageStringOf(x) } func (*DescriptorProto_ExtensionRange) ProtoMessage() {} func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DescriptorProto_ExtensionRange.ProtoReflect.Descriptor instead. func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 0} } func (x *DescriptorProto_ExtensionRange) GetStart() int32 { if x != nil && x.Start != nil { return *x.Start } return 0 } func (x *DescriptorProto_ExtensionRange) GetEnd() int32 { if x != nil && x.End != nil { return *x.End } return 0 } func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { if x != nil { return x.Options } return nil } // Range of reserved tag numbers. Reserved tag numbers may not be used by // fields or extension ranges in the same message. Reserved ranges may // not overlap. type DescriptorProto_ReservedRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. } func (x *DescriptorProto_ReservedRange) Reset() { *x = DescriptorProto_ReservedRange{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DescriptorProto_ReservedRange) String() string { return protoimpl.X.MessageStringOf(x) } func (*DescriptorProto_ReservedRange) ProtoMessage() {} func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DescriptorProto_ReservedRange.ProtoReflect.Descriptor instead. func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 1} } func (x *DescriptorProto_ReservedRange) GetStart() int32 { if x != nil && x.Start != nil { return *x.Start } return 0 } func (x *DescriptorProto_ReservedRange) GetEnd() int32 { if x != nil && x.End != nil { return *x.End } return 0 } // Range of reserved numeric values. Reserved values may not be used by // entries in the same enum. Reserved ranges may not overlap. // // Note that this is distinct from DescriptorProto.ReservedRange in that it // is inclusive such that it can appropriately represent the entire int32 // domain. type EnumDescriptorProto_EnumReservedRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. } func (x *EnumDescriptorProto_EnumReservedRange) Reset() { *x = EnumDescriptorProto_EnumReservedRange{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumDescriptorProto_EnumReservedRange) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumDescriptorProto_EnumReservedRange.ProtoReflect.Descriptor instead. func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6, 0} } func (x *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { if x != nil && x.Start != nil { return *x.Start } return 0 } func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { if x != nil && x.End != nil { return *x.End } return 0 } // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files). // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents // "foo.(bar.baz).qux". type UninterpretedOption_NamePart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` } func (x *UninterpretedOption_NamePart) Reset() { *x = UninterpretedOption_NamePart{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UninterpretedOption_NamePart) String() string { return protoimpl.X.MessageStringOf(x) } func (*UninterpretedOption_NamePart) ProtoMessage() {} func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UninterpretedOption_NamePart.ProtoReflect.Descriptor instead. func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18, 0} } func (x *UninterpretedOption_NamePart) GetNamePart() string { if x != nil && x.NamePart != nil { return *x.NamePart } return "" } func (x *UninterpretedOption_NamePart) GetIsExtension() bool { if x != nil && x.IsExtension != nil { return *x.IsExtension } return false } type SourceCodeInfo_Location struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Identifies which part of the FileDescriptorProto was defined at this // location. // // Each element is a field number or an index. They form a path from // the root FileDescriptorProto to the place where the definition. For // example, this path: // [ 4, 3, 2, 7, 1 ] // refers to: // file.message_type(3) // 4, 3 // .field(7) // 2, 7 // .name() // 1 // This is because FileDescriptorProto.message_type has field number 4: // repeated DescriptorProto message_type = 4; // and DescriptorProto.field has field number 2: // repeated FieldDescriptorProto field = 2; // and FieldDescriptorProto.name has field number 1: // optional string name = 1; // // Thus, the above path gives the location of a field name. If we removed // the last element: // [ 4, 3, 2, 7 ] // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon). Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` // Always has exactly three or four elements: start line, start column, // end line (optional, otherwise assumed same as start line), end column. // These are packed into a single field for efficiency. Note that line // and column numbers are zero-based -- typically you will want to add // 1 to each before displaying to a user. Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` // If this SourceCodeInfo represents a complete declaration, these are any // comments appearing before and after the declaration which appear to be // attached to the declaration. // // A series of line comments appearing on consecutive lines, with no other // tokens appearing on those lines, will be treated as a single comment. // // leading_detached_comments will keep paragraphs of comments that appear // before (but not connected to) the current element. Each paragraph, // separated by empty lines, will be one comment element in the repeated // field. // // Only the comment content is provided; comment markers (e.g. //) are // stripped out. For block comments, leading whitespace and an asterisk // will be stripped from the beginning of each line other than the first. // Newlines are included in the output. // // Examples: // // optional int32 foo = 1; // Comment attached to foo. // // Comment attached to bar. // optional int32 bar = 2; // // optional string baz = 3; // // Comment attached to baz. // // Another line attached to baz. // // // Comment attached to qux. // // // // Another line attached to qux. // optional double qux = 4; // // // Detached comment for corge. This is not leading or trailing comments // // to qux or corge because there are blank lines separating it from // // both. // // // Detached comment for corge paragraph 2. // // optional string corge = 5; // /* Block comment attached // * to corge. Leading asterisks // * will be removed. */ // /* Block comment attached to // * grault. */ // optional int32 grault = 6; // // // ignored detached comments. LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` } func (x *SourceCodeInfo_Location) Reset() { *x = SourceCodeInfo_Location{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SourceCodeInfo_Location) String() string { return protoimpl.X.MessageStringOf(x) } func (*SourceCodeInfo_Location) ProtoMessage() {} func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SourceCodeInfo_Location.ProtoReflect.Descriptor instead. func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0} } func (x *SourceCodeInfo_Location) GetPath() []int32 { if x != nil { return x.Path } return nil } func (x *SourceCodeInfo_Location) GetSpan() []int32 { if x != nil { return x.Span } return nil } func (x *SourceCodeInfo_Location) GetLeadingComments() string { if x != nil && x.LeadingComments != nil { return *x.LeadingComments } return "" } func (x *SourceCodeInfo_Location) GetTrailingComments() string { if x != nil && x.TrailingComments != nil { return *x.TrailingComments } return "" } func (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { if x != nil { return x.LeadingDetachedComments } return nil } type GeneratedCodeInfo_Annotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` // Identifies the filesystem path to the original source .proto. SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` // Identifies the starting offset in bytes in the generated code // that relates to the identified object. Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` // Identifies the ending offset in bytes in the generated code that // relates to the identified offset. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` } func (x *GeneratedCodeInfo_Annotation) Reset() { *x = GeneratedCodeInfo_Annotation{} if protoimpl.UnsafeEnabled { mi := &file_google_protobuf_descriptor_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GeneratedCodeInfo_Annotation) String() string { return protoimpl.X.MessageStringOf(x) } func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GeneratedCodeInfo_Annotation.ProtoReflect.Descriptor instead. func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0} } func (x *GeneratedCodeInfo_Annotation) GetPath() []int32 { if x != nil { return x.Path } return nil } func (x *GeneratedCodeInfo_Annotation) GetSourceFile() string { if x != nil && x.SourceFile != nil { return *x.SourceFile } return "" } func (x *GeneratedCodeInfo_Annotation) GetBegin() int32 { if x != nil && x.Begin != nil { return *x.Begin } return 0 } func (x *GeneratedCodeInfo_Annotation) GetEnd() int32 { if x != nil && x.End != nil { return *x.End } return 0 } var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x4d, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xe4, 0x04, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x77, 0x65, 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x22, 0xb9, 0x06, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x7c, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0x91, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, 0x70, 0x68, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xe0, 0x02, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, } var ( file_google_protobuf_descriptor_proto_rawDescOnce sync.Once file_google_protobuf_descriptor_proto_rawDescData = file_google_protobuf_descriptor_proto_rawDesc ) func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { file_google_protobuf_descriptor_proto_rawDescOnce.Do(func() { file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_descriptor_proto_rawDescData) }) return file_google_protobuf_descriptor_proto_rawDescData } var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 6) var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ (FieldDescriptorProto_Type)(0), // 0: google.protobuf.FieldDescriptorProto.Type (FieldDescriptorProto_Label)(0), // 1: google.protobuf.FieldDescriptorProto.Label (FileOptions_OptimizeMode)(0), // 2: google.protobuf.FileOptions.OptimizeMode (FieldOptions_CType)(0), // 3: google.protobuf.FieldOptions.CType (FieldOptions_JSType)(0), // 4: google.protobuf.FieldOptions.JSType (MethodOptions_IdempotencyLevel)(0), // 5: google.protobuf.MethodOptions.IdempotencyLevel (*FileDescriptorSet)(nil), // 6: google.protobuf.FileDescriptorSet (*FileDescriptorProto)(nil), // 7: google.protobuf.FileDescriptorProto (*DescriptorProto)(nil), // 8: google.protobuf.DescriptorProto (*ExtensionRangeOptions)(nil), // 9: google.protobuf.ExtensionRangeOptions (*FieldDescriptorProto)(nil), // 10: google.protobuf.FieldDescriptorProto (*OneofDescriptorProto)(nil), // 11: google.protobuf.OneofDescriptorProto (*EnumDescriptorProto)(nil), // 12: google.protobuf.EnumDescriptorProto (*EnumValueDescriptorProto)(nil), // 13: google.protobuf.EnumValueDescriptorProto (*ServiceDescriptorProto)(nil), // 14: google.protobuf.ServiceDescriptorProto (*MethodDescriptorProto)(nil), // 15: google.protobuf.MethodDescriptorProto (*FileOptions)(nil), // 16: google.protobuf.FileOptions (*MessageOptions)(nil), // 17: google.protobuf.MessageOptions (*FieldOptions)(nil), // 18: google.protobuf.FieldOptions (*OneofOptions)(nil), // 19: google.protobuf.OneofOptions (*EnumOptions)(nil), // 20: google.protobuf.EnumOptions (*EnumValueOptions)(nil), // 21: google.protobuf.EnumValueOptions (*ServiceOptions)(nil), // 22: google.protobuf.ServiceOptions (*MethodOptions)(nil), // 23: google.protobuf.MethodOptions (*UninterpretedOption)(nil), // 24: google.protobuf.UninterpretedOption (*SourceCodeInfo)(nil), // 25: google.protobuf.SourceCodeInfo (*GeneratedCodeInfo)(nil), // 26: google.protobuf.GeneratedCodeInfo (*DescriptorProto_ExtensionRange)(nil), // 27: google.protobuf.DescriptorProto.ExtensionRange (*DescriptorProto_ReservedRange)(nil), // 28: google.protobuf.DescriptorProto.ReservedRange (*EnumDescriptorProto_EnumReservedRange)(nil), // 29: google.protobuf.EnumDescriptorProto.EnumReservedRange (*UninterpretedOption_NamePart)(nil), // 30: google.protobuf.UninterpretedOption.NamePart (*SourceCodeInfo_Location)(nil), // 31: google.protobuf.SourceCodeInfo.Location (*GeneratedCodeInfo_Annotation)(nil), // 32: google.protobuf.GeneratedCodeInfo.Annotation } var file_google_protobuf_descriptor_proto_depIdxs = []int32{ 7, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto 8, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto 12, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto 14, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto 10, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto 16, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions 25, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo 10, // 7: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto 10, // 8: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto 8, // 9: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto 12, // 10: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto 27, // 11: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange 11, // 12: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto 17, // 13: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions 28, // 14: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange 24, // 15: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 1, // 16: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label 0, // 17: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type 18, // 18: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions 19, // 19: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions 13, // 20: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto 20, // 21: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions 29, // 22: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange 21, // 23: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions 15, // 24: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto 22, // 25: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions 23, // 26: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions 2, // 27: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode 24, // 28: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 24, // 29: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 3, // 30: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType 4, // 31: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType 24, // 32: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 24, // 33: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 24, // 34: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 24, // 35: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 24, // 36: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 5, // 37: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel 24, // 38: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 30, // 39: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart 31, // 40: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location 32, // 41: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation 9, // 42: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions 43, // [43:43] is the sub-list for method output_type 43, // [43:43] is the sub-list for method input_type 43, // [43:43] is the sub-list for extension type_name 43, // [43:43] is the sub-list for extension extendee 0, // [0:43] is the sub-list for field type_name } func init() { file_google_protobuf_descriptor_proto_init() } func file_google_protobuf_descriptor_proto_init() { if File_google_protobuf_descriptor_proto != nil { return } if !protoimpl.UnsafeEnabled { file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileDescriptorSet); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileDescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtensionRangeOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldDescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofDescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumDescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumValueDescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceDescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MethodDescriptorProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MessageOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumValueOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MethodOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UninterpretedOption); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SourceCodeInfo); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GeneratedCodeInfo); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DescriptorProto_ExtensionRange); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DescriptorProto_ReservedRange); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UninterpretedOption_NamePart); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SourceCodeInfo_Location); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GeneratedCodeInfo_Annotation); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, NumEnums: 6, NumMessages: 27, NumExtensions: 0, NumServices: 0, }, GoTypes: file_google_protobuf_descriptor_proto_goTypes, DependencyIndexes: file_google_protobuf_descriptor_proto_depIdxs, EnumInfos: file_google_protobuf_descriptor_proto_enumTypes, MessageInfos: file_google_protobuf_descriptor_proto_msgTypes, }.Build() File_google_protobuf_descriptor_proto = out.File file_google_protobuf_descriptor_proto_rawDesc = nil file_google_protobuf_descriptor_proto_goTypes = nil file_google_protobuf_descriptor_proto_depIdxs = nil }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/decode.go
// 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 proto import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/runtime/protoiface" ) // UnmarshalOptions configures the unmarshaler. // // Example usage: // err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m) type UnmarshalOptions struct { pragma.NoUnkeyedLiterals // Merge merges the input into the destination message. // The default behavior is to always reset the message before unmarshaling, // unless Merge is specified. Merge bool // AllowPartial accepts input for messages that will result in missing // required fields. If AllowPartial is false (the default), Unmarshal will // return an error if there are any missing required fields. AllowPartial bool // If DiscardUnknown is set, unknown fields are ignored. DiscardUnknown bool // Resolver is used for looking up types when unmarshaling extension fields. // If nil, this defaults to using protoregistry.GlobalTypes. Resolver interface { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } } // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). func Unmarshal(b []byte, m Message) error { _, err := UnmarshalOptions{}.unmarshal(b, m.ProtoReflect()) return err } // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error { _, err := o.unmarshal(b, m.ProtoReflect()) return err } // UnmarshalState parses a wire-format message and places the result in m. // // This method permits fine-grained control over the unmarshaler. // Most users should use Unmarshal instead. func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { return o.unmarshal(in.Buf, in.Message) } // unmarshal is a centralized function that all unmarshal operations go through. // For profiling purposes, avoid changing the name of this function or // introducing other code paths for unmarshal that do not go through this. func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out protoiface.UnmarshalOutput, err error) { if o.Resolver == nil { o.Resolver = protoregistry.GlobalTypes } if !o.Merge { Reset(m.Interface()) } allowPartial := o.AllowPartial o.Merge = true o.AllowPartial = true methods := protoMethods(m) if methods != nil && methods.Unmarshal != nil && !(o.DiscardUnknown && methods.Flags&protoiface.SupportUnmarshalDiscardUnknown == 0) { in := protoiface.UnmarshalInput{ Message: m, Buf: b, Resolver: o.Resolver, } if o.DiscardUnknown { in.Flags |= protoiface.UnmarshalDiscardUnknown } out, err = methods.Unmarshal(in) } else { err = o.unmarshalMessageSlow(b, m) } if err != nil { return out, err } if allowPartial || (out.Flags&protoiface.UnmarshalInitialized != 0) { return out, nil } return out, checkInitialized(m) } func (o UnmarshalOptions) unmarshalMessage(b []byte, m protoreflect.Message) error { _, err := o.unmarshal(b, m) return err } func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message) error { md := m.Descriptor() if messageset.IsMessageSet(md) { return o.unmarshalMessageSet(b, m) } fields := md.Fields() for len(b) > 0 { // Parse the tag (field number and wire type). num, wtyp, tagLen := protowire.ConsumeTag(b) if tagLen < 0 { return errDecode } if num > protowire.MaxValidNumber { return errDecode } // Find the field descriptor for this field number. fd := fields.ByNumber(num) if fd == nil && md.ExtensionRanges().Has(num) { extType, err := o.Resolver.FindExtensionByNumber(md.FullName(), num) if err != nil && err != protoregistry.NotFound { return errors.New("%v: unable to resolve extension %v: %v", md.FullName(), num, err) } if extType != nil { fd = extType.TypeDescriptor() } } var err error if fd == nil { err = errUnknown } else if flags.ProtoLegacy { if fd.IsWeak() && fd.Message().IsPlaceholder() { err = errUnknown // weak referent is not linked in } } // Parse the field value. var valLen int switch { case err != nil: case fd.IsList(): valLen, err = o.unmarshalList(b[tagLen:], wtyp, m.Mutable(fd).List(), fd) case fd.IsMap(): valLen, err = o.unmarshalMap(b[tagLen:], wtyp, m.Mutable(fd).Map(), fd) default: valLen, err = o.unmarshalSingular(b[tagLen:], wtyp, m, fd) } if err != nil { if err != errUnknown { return err } valLen = protowire.ConsumeFieldValue(num, wtyp, b[tagLen:]) if valLen < 0 { return errDecode } if !o.DiscardUnknown { m.SetUnknown(append(m.GetUnknown(), b[:tagLen+valLen]...)) } } b = b[tagLen+valLen:] } return nil } func (o UnmarshalOptions) unmarshalSingular(b []byte, wtyp protowire.Type, m protoreflect.Message, fd protoreflect.FieldDescriptor) (n int, err error) { v, n, err := o.unmarshalScalar(b, wtyp, fd) if err != nil { return 0, err } switch fd.Kind() { case protoreflect.GroupKind, protoreflect.MessageKind: m2 := m.Mutable(fd).Message() if err := o.unmarshalMessage(v.Bytes(), m2); err != nil { return n, err } default: // Non-message scalars replace the previous value. m.Set(fd, v) } return n, nil } func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv protoreflect.Map, fd protoreflect.FieldDescriptor) (n int, err error) { if wtyp != protowire.BytesType { return 0, errUnknown } b, n = protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } var ( keyField = fd.MapKey() valField = fd.MapValue() key protoreflect.Value val protoreflect.Value haveKey bool haveVal bool ) switch valField.Kind() { case protoreflect.GroupKind, protoreflect.MessageKind: val = mapv.NewValue() } // Map entries are represented as a two-element message with fields // containing the key and value. for len(b) > 0 { num, wtyp, n := protowire.ConsumeTag(b) if n < 0 { return 0, errDecode } if num > protowire.MaxValidNumber { return 0, errDecode } b = b[n:] err = errUnknown switch num { case genid.MapEntry_Key_field_number: key, n, err = o.unmarshalScalar(b, wtyp, keyField) if err != nil { break } haveKey = true case genid.MapEntry_Value_field_number: var v protoreflect.Value v, n, err = o.unmarshalScalar(b, wtyp, valField) if err != nil { break } switch valField.Kind() { case protoreflect.GroupKind, protoreflect.MessageKind: if err := o.unmarshalMessage(v.Bytes(), val.Message()); err != nil { return 0, err } default: val = v } haveVal = true } if err == errUnknown { n = protowire.ConsumeFieldValue(num, wtyp, b) if n < 0 { return 0, errDecode } } else if err != nil { return 0, err } b = b[n:] } // Every map entry should have entries for key and value, but this is not strictly required. if !haveKey { key = keyField.Default() } if !haveVal { switch valField.Kind() { case protoreflect.GroupKind, protoreflect.MessageKind: default: val = valField.Default() } } mapv.Set(key.MapKey(), val) return n, nil } // errUnknown is used internally to indicate fields which should be added // to the unknown field set of a message. It is never returned from an exported // function. var errUnknown = errors.New("BUG: internal error (unknown)") var errDecode = errors.New("cannot parse invalid wire-format data")
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/extension.go
// 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 proto import ( "google.golang.org/protobuf/reflect/protoreflect" ) // HasExtension reports whether an extension field is populated. // It returns false if m is invalid or if xt does not extend m. func HasExtension(m Message, xt protoreflect.ExtensionType) bool { // Treat nil message interface as an empty message; no populated fields. if m == nil { return false } // As a special-case, we reports invalid or mismatching descriptors // as always not being populated (since they aren't). if xt == nil || m.ProtoReflect().Descriptor() != xt.TypeDescriptor().ContainingMessage() { return false } return m.ProtoReflect().Has(xt.TypeDescriptor()) } // ClearExtension clears an extension field such that subsequent // HasExtension calls return false. // It panics if m is invalid or if xt does not extend m. func ClearExtension(m Message, xt protoreflect.ExtensionType) { m.ProtoReflect().Clear(xt.TypeDescriptor()) } // GetExtension retrieves the value for an extension field. // If the field is unpopulated, it returns the default value for // scalars and an immutable, empty value for lists or messages. // It panics if xt does not extend m. func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { // Treat nil message interface as an empty message; return the default. if m == nil { return xt.InterfaceOf(xt.Zero()) } return xt.InterfaceOf(m.ProtoReflect().Get(xt.TypeDescriptor())) } // SetExtension stores the value of an extension field. // It panics if m is invalid, xt does not extend m, or if type of v // is invalid for the specified extension field. func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { xd := xt.TypeDescriptor() pv := xt.ValueOf(v) // Specially treat an invalid list, map, or message as clear. isValid := true switch { case xd.IsList(): isValid = pv.List().IsValid() case xd.IsMap(): isValid = pv.Map().IsValid() case xd.Message() != nil: isValid = pv.Message().IsValid() } if !isValid { m.ProtoReflect().Clear(xd) return } m.ProtoReflect().Set(xd, pv) } // RangeExtensions iterates over every populated extension field in m in an // undefined order, calling f for each extension type and value encountered. // It returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current extension field. func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { // Treat nil message interface as an empty message; nothing to range over. if m == nil { return } m.ProtoReflect().Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { if fd.IsExtension() { xt := fd.(protoreflect.ExtensionTypeDescriptor).Type() vi := xt.InterfaceOf(v) return f(xt, vi) } return true }) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/size.go
// 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 proto import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" ) // Size returns the size in bytes of the wire-format encoding of m. func Size(m Message) int { return MarshalOptions{}.Size(m) } // Size returns the size in bytes of the wire-format encoding of m. func (o MarshalOptions) Size(m Message) int { // Treat a nil message interface as an empty message; nothing to output. if m == nil { return 0 } return o.size(m.ProtoReflect()) } // size is a centralized function that all size operations go through. // For profiling purposes, avoid changing the name of this function or // introducing other code paths for size that do not go through this. func (o MarshalOptions) size(m protoreflect.Message) (size int) { methods := protoMethods(m) if methods != nil && methods.Size != nil { out := methods.Size(protoiface.SizeInput{ Message: m, }) return out.Size } if methods != nil && methods.Marshal != nil { // This is not efficient, but we don't have any choice. // This case is mainly used for legacy types with a Marshal method. out, _ := methods.Marshal(protoiface.MarshalInput{ Message: m, }) return len(out.Buf) } return o.sizeMessageSlow(m) } func (o MarshalOptions) sizeMessageSlow(m protoreflect.Message) (size int) { if messageset.IsMessageSet(m.Descriptor()) { return o.sizeMessageSet(m) } m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { size += o.sizeField(fd, v) return true }) size += len(m.GetUnknown()) return size } func (o MarshalOptions) sizeField(fd protoreflect.FieldDescriptor, value protoreflect.Value) (size int) { num := fd.Number() switch { case fd.IsList(): return o.sizeList(num, fd, value.List()) case fd.IsMap(): return o.sizeMap(num, fd, value.Map()) default: return protowire.SizeTag(num) + o.sizeSingular(num, fd.Kind(), value) } } func (o MarshalOptions) sizeList(num protowire.Number, fd protoreflect.FieldDescriptor, list protoreflect.List) (size int) { if fd.IsPacked() && list.Len() > 0 { content := 0 for i, llen := 0, list.Len(); i < llen; i++ { content += o.sizeSingular(num, fd.Kind(), list.Get(i)) } return protowire.SizeTag(num) + protowire.SizeBytes(content) } for i, llen := 0, list.Len(); i < llen; i++ { size += protowire.SizeTag(num) + o.sizeSingular(num, fd.Kind(), list.Get(i)) } return size } func (o MarshalOptions) sizeMap(num protowire.Number, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) (size int) { mapv.Range(func(key protoreflect.MapKey, value protoreflect.Value) bool { size += protowire.SizeTag(num) size += protowire.SizeBytes(o.sizeField(fd.MapKey(), key.Value()) + o.sizeField(fd.MapValue(), value)) return true }) return size }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/equal.go
// 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 proto import ( "bytes" "math" "reflect" "google.golang.org/protobuf/encoding/protowire" pref "google.golang.org/protobuf/reflect/protoreflect" ) // Equal reports whether two messages are equal. // If two messages marshal to the same bytes under deterministic serialization, // then Equal is guaranteed to report true. // // Two messages are equal if they belong to the same message descriptor, // have the same set of populated known and extension field values, // and the same set of unknown fields values. If either of the top-level // messages are invalid, then Equal reports true only if both are invalid. // // Scalar values are compared with the equivalent of the == operator in Go, // except bytes values which are compared using bytes.Equal and // floating point values which specially treat NaNs as equal. // Message values are compared by recursively calling Equal. // Lists are equal if each element value is also equal. // Maps are equal if they have the same set of keys, where the pair of values // for each key is also equal. func Equal(x, y Message) bool { if x == nil || y == nil { return x == nil && y == nil } mx := x.ProtoReflect() my := y.ProtoReflect() if mx.IsValid() != my.IsValid() { return false } return equalMessage(mx, my) } // equalMessage compares two messages. func equalMessage(mx, my pref.Message) bool { if mx.Descriptor() != my.Descriptor() { return false } nx := 0 equal := true mx.Range(func(fd pref.FieldDescriptor, vx pref.Value) bool { nx++ vy := my.Get(fd) equal = my.Has(fd) && equalField(fd, vx, vy) return equal }) if !equal { return false } ny := 0 my.Range(func(fd pref.FieldDescriptor, vx pref.Value) bool { ny++ return true }) if nx != ny { return false } return equalUnknown(mx.GetUnknown(), my.GetUnknown()) } // equalField compares two fields. func equalField(fd pref.FieldDescriptor, x, y pref.Value) bool { switch { case fd.IsList(): return equalList(fd, x.List(), y.List()) case fd.IsMap(): return equalMap(fd, x.Map(), y.Map()) default: return equalValue(fd, x, y) } } // equalMap compares two maps. func equalMap(fd pref.FieldDescriptor, x, y pref.Map) bool { if x.Len() != y.Len() { return false } equal := true x.Range(func(k pref.MapKey, vx pref.Value) bool { vy := y.Get(k) equal = y.Has(k) && equalValue(fd.MapValue(), vx, vy) return equal }) return equal } // equalList compares two lists. func equalList(fd pref.FieldDescriptor, x, y pref.List) bool { if x.Len() != y.Len() { return false } for i := x.Len() - 1; i >= 0; i-- { if !equalValue(fd, x.Get(i), y.Get(i)) { return false } } return true } // equalValue compares two singular values. func equalValue(fd pref.FieldDescriptor, x, y pref.Value) bool { switch fd.Kind() { case pref.BoolKind: return x.Bool() == y.Bool() case pref.EnumKind: return x.Enum() == y.Enum() case pref.Int32Kind, pref.Sint32Kind, pref.Int64Kind, pref.Sint64Kind, pref.Sfixed32Kind, pref.Sfixed64Kind: return x.Int() == y.Int() case pref.Uint32Kind, pref.Uint64Kind, pref.Fixed32Kind, pref.Fixed64Kind: return x.Uint() == y.Uint() case pref.FloatKind, pref.DoubleKind: fx := x.Float() fy := y.Float() if math.IsNaN(fx) || math.IsNaN(fy) { return math.IsNaN(fx) && math.IsNaN(fy) } return fx == fy case pref.StringKind: return x.String() == y.String() case pref.BytesKind: return bytes.Equal(x.Bytes(), y.Bytes()) case pref.MessageKind, pref.GroupKind: return equalMessage(x.Message(), y.Message()) default: return x.Interface() == y.Interface() } } // equalUnknown compares unknown fields by direct comparison on the raw bytes // of each individual field number. func equalUnknown(x, y pref.RawFields) bool { if len(x) != len(y) { return false } if bytes.Equal([]byte(x), []byte(y)) { return true } mx := make(map[pref.FieldNumber]pref.RawFields) my := make(map[pref.FieldNumber]pref.RawFields) for len(x) > 0 { fnum, _, n := protowire.ConsumeField(x) mx[fnum] = append(mx[fnum], x[:n]...) x = x[n:] } for len(y) > 0 { fnum, _, n := protowire.ConsumeField(y) my[fnum] = append(my[fnum], y[:n]...) y = y[n:] } return reflect.DeepEqual(mx, my) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/proto.go
// 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 proto import ( "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/reflect/protoreflect" ) // Message is the top-level interface that all messages must implement. // It provides access to a reflective view of a message. // Any implementation of this interface may be used with all functions in the // protobuf module that accept a Message, except where otherwise specified. // // This is the v2 interface definition for protobuf messages. // The v1 interface definition is "github.com/golang/protobuf/proto".Message. // // To convert a v1 message to a v2 message, // use "github.com/golang/protobuf/proto".MessageV2. // To convert a v2 message to a v1 message, // use "github.com/golang/protobuf/proto".MessageV1. type Message = protoreflect.ProtoMessage // Error matches all errors produced by packages in the protobuf module. // // That is, errors.Is(err, Error) reports whether an error is produced // by this module. var Error error func init() { Error = errors.Error } // MessageName returns the full name of m. // If m is nil, it returns an empty string. func MessageName(m Message) protoreflect.FullName { if m == nil { return "" } return m.ProtoReflect().Descriptor().FullName() }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/messageset.go
// 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 proto import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/internal/order" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ) func (o MarshalOptions) sizeMessageSet(m protoreflect.Message) (size int) { m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { size += messageset.SizeField(fd.Number()) size += protowire.SizeTag(messageset.FieldMessage) size += protowire.SizeBytes(o.size(v.Message())) return true }) size += messageset.SizeUnknown(m.GetUnknown()) return size } func (o MarshalOptions) marshalMessageSet(b []byte, m protoreflect.Message) ([]byte, error) { if !flags.ProtoLegacy { return b, errors.New("no support for message_set_wire_format") } fieldOrder := order.AnyFieldOrder if o.Deterministic { fieldOrder = order.NumberFieldOrder } var err error order.RangeFields(m, fieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { b, err = o.marshalMessageSetField(b, fd, v) return err == nil }) if err != nil { return b, err } return messageset.AppendUnknown(b, m.GetUnknown()) } func (o MarshalOptions) marshalMessageSetField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) { b = messageset.AppendFieldStart(b, fd.Number()) b = protowire.AppendTag(b, messageset.FieldMessage, protowire.BytesType) b = protowire.AppendVarint(b, uint64(o.Size(value.Message().Interface()))) b, err := o.marshalMessage(b, value.Message()) if err != nil { return b, err } b = messageset.AppendFieldEnd(b) return b, nil } func (o UnmarshalOptions) unmarshalMessageSet(b []byte, m protoreflect.Message) error { if !flags.ProtoLegacy { return errors.New("no support for message_set_wire_format") } return messageset.Unmarshal(b, false, func(num protowire.Number, v []byte) error { err := o.unmarshalMessageSetField(m, num, v) if err == errUnknown { unknown := m.GetUnknown() unknown = protowire.AppendTag(unknown, num, protowire.BytesType) unknown = protowire.AppendBytes(unknown, v) m.SetUnknown(unknown) return nil } return err }) } func (o UnmarshalOptions) unmarshalMessageSetField(m protoreflect.Message, num protowire.Number, v []byte) error { md := m.Descriptor() if !md.ExtensionRanges().Has(num) { return errUnknown } xt, err := o.Resolver.FindExtensionByNumber(md.FullName(), num) if err == protoregistry.NotFound { return errUnknown } if err != nil { return errors.New("%v: unable to resolve extension %v: %v", md.FullName(), num, err) } xd := xt.TypeDescriptor() if err := o.unmarshalMessage(v, m.Mutable(xd).Message()); err != nil { return err } return nil }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/encode_gen.go
// 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. // Code generated by generate-types. DO NOT EDIT. package proto import ( "math" "unicode/utf8" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/reflect/protoreflect" ) var wireTypes = map[protoreflect.Kind]protowire.Type{ protoreflect.BoolKind: protowire.VarintType, protoreflect.EnumKind: protowire.VarintType, protoreflect.Int32Kind: protowire.VarintType, protoreflect.Sint32Kind: protowire.VarintType, protoreflect.Uint32Kind: protowire.VarintType, protoreflect.Int64Kind: protowire.VarintType, protoreflect.Sint64Kind: protowire.VarintType, protoreflect.Uint64Kind: protowire.VarintType, protoreflect.Sfixed32Kind: protowire.Fixed32Type, protoreflect.Fixed32Kind: protowire.Fixed32Type, protoreflect.FloatKind: protowire.Fixed32Type, protoreflect.Sfixed64Kind: protowire.Fixed64Type, protoreflect.Fixed64Kind: protowire.Fixed64Type, protoreflect.DoubleKind: protowire.Fixed64Type, protoreflect.StringKind: protowire.BytesType, protoreflect.BytesKind: protowire.BytesType, protoreflect.MessageKind: protowire.BytesType, protoreflect.GroupKind: protowire.StartGroupType, } func (o MarshalOptions) marshalSingular(b []byte, fd protoreflect.FieldDescriptor, v protoreflect.Value) ([]byte, error) { switch fd.Kind() { case protoreflect.BoolKind: b = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool())) case protoreflect.EnumKind: b = protowire.AppendVarint(b, uint64(v.Enum())) case protoreflect.Int32Kind: b = protowire.AppendVarint(b, uint64(int32(v.Int()))) case protoreflect.Sint32Kind: b = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int())))) case protoreflect.Uint32Kind: b = protowire.AppendVarint(b, uint64(uint32(v.Uint()))) case protoreflect.Int64Kind: b = protowire.AppendVarint(b, uint64(v.Int())) case protoreflect.Sint64Kind: b = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int())) case protoreflect.Uint64Kind: b = protowire.AppendVarint(b, v.Uint()) case protoreflect.Sfixed32Kind: b = protowire.AppendFixed32(b, uint32(v.Int())) case protoreflect.Fixed32Kind: b = protowire.AppendFixed32(b, uint32(v.Uint())) case protoreflect.FloatKind: b = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float()))) case protoreflect.Sfixed64Kind: b = protowire.AppendFixed64(b, uint64(v.Int())) case protoreflect.Fixed64Kind: b = protowire.AppendFixed64(b, v.Uint()) case protoreflect.DoubleKind: b = protowire.AppendFixed64(b, math.Float64bits(v.Float())) case protoreflect.StringKind: if strs.EnforceUTF8(fd) && !utf8.ValidString(v.String()) { return b, errors.InvalidUTF8(string(fd.FullName())) } b = protowire.AppendString(b, v.String()) case protoreflect.BytesKind: b = protowire.AppendBytes(b, v.Bytes()) case protoreflect.MessageKind: var pos int var err error b, pos = appendSpeculativeLength(b) b, err = o.marshalMessage(b, v.Message()) if err != nil { return b, err } b = finishSpeculativeLength(b, pos) case protoreflect.GroupKind: var err error b, err = o.marshalMessage(b, v.Message()) if err != nil { return b, err } b = protowire.AppendVarint(b, protowire.EncodeTag(fd.Number(), protowire.EndGroupType)) default: return b, errors.New("invalid kind %v", fd.Kind()) } return b, nil }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/encode.go
// 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 proto import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/order" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" ) // MarshalOptions configures the marshaler. // // Example usage: // b, err := MarshalOptions{Deterministic: true}.Marshal(m) type MarshalOptions struct { pragma.NoUnkeyedLiterals // AllowPartial allows messages that have missing required fields to marshal // without returning an error. If AllowPartial is false (the default), // Marshal will return an error if there are any missing required fields. AllowPartial bool // Deterministic controls whether the same message will always be // serialized to the same bytes within the same binary. // // Setting this option guarantees that repeated serialization of // the same message will return the same bytes, and that different // processes of the same binary (which may be executing on different // machines) will serialize equal messages to the same bytes. // It has no effect on the resulting size of the encoded message compared // to a non-deterministic marshal. // // Note that the deterministic serialization is NOT canonical across // languages. It is not guaranteed to remain stable over time. It is // unstable across different builds with schema changes due to unknown // fields. Users who need canonical serialization (e.g., persistent // storage in a canonical form, fingerprinting, etc.) must define // their own canonicalization specification and implement their own // serializer rather than relying on this API. // // If deterministic serialization is requested, map entries will be // sorted by keys in lexographical order. This is an implementation // detail and subject to change. Deterministic bool // UseCachedSize indicates that the result of a previous Size call // may be reused. // // Setting this option asserts that: // // 1. Size has previously been called on this message with identical // options (except for UseCachedSize itself). // // 2. The message and all its submessages have not changed in any // way since the Size call. // // If either of these invariants is violated, // the results are undefined and may include panics or corrupted output. // // Implementations MAY take this option into account to provide // better performance, but there is no guarantee that they will do so. // There is absolutely no guarantee that Size followed by Marshal with // UseCachedSize set will perform equivalently to Marshal alone. UseCachedSize bool } // Marshal returns the wire-format encoding of m. func Marshal(m Message) ([]byte, error) { // Treat nil message interface as an empty message; nothing to output. if m == nil { return nil, nil } out, err := MarshalOptions{}.marshal(nil, m.ProtoReflect()) if len(out.Buf) == 0 && err == nil { out.Buf = emptyBytesForMessage(m) } return out.Buf, err } // Marshal returns the wire-format encoding of m. func (o MarshalOptions) Marshal(m Message) ([]byte, error) { // Treat nil message interface as an empty message; nothing to output. if m == nil { return nil, nil } out, err := o.marshal(nil, m.ProtoReflect()) if len(out.Buf) == 0 && err == nil { out.Buf = emptyBytesForMessage(m) } return out.Buf, err } // emptyBytesForMessage returns a nil buffer if and only if m is invalid, // otherwise it returns a non-nil empty buffer. // // This is to assist the edge-case where user-code does the following: // m1.OptionalBytes, _ = proto.Marshal(m2) // where they expect the proto2 "optional_bytes" field to be populated // if any only if m2 is a valid message. func emptyBytesForMessage(m Message) []byte { if m == nil || !m.ProtoReflect().IsValid() { return nil } return emptyBuf[:] } // MarshalAppend appends the wire-format encoding of m to b, // returning the result. func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) { // Treat nil message interface as an empty message; nothing to append. if m == nil { return b, nil } out, err := o.marshal(b, m.ProtoReflect()) return out.Buf, err } // MarshalState returns the wire-format encoding of a message. // // This method permits fine-grained control over the marshaler. // Most users should use Marshal instead. func (o MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) { return o.marshal(in.Buf, in.Message) } // marshal is a centralized function that all marshal operations go through. // For profiling purposes, avoid changing the name of this function or // introducing other code paths for marshal that do not go through this. func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoiface.MarshalOutput, err error) { allowPartial := o.AllowPartial o.AllowPartial = true if methods := protoMethods(m); methods != nil && methods.Marshal != nil && !(o.Deterministic && methods.Flags&protoiface.SupportMarshalDeterministic == 0) { in := protoiface.MarshalInput{ Message: m, Buf: b, } if o.Deterministic { in.Flags |= protoiface.MarshalDeterministic } if o.UseCachedSize { in.Flags |= protoiface.MarshalUseCachedSize } if methods.Size != nil { sout := methods.Size(protoiface.SizeInput{ Message: m, Flags: in.Flags, }) if cap(b) < len(b)+sout.Size { in.Buf = make([]byte, len(b), growcap(cap(b), len(b)+sout.Size)) copy(in.Buf, b) } in.Flags |= protoiface.MarshalUseCachedSize } out, err = methods.Marshal(in) } else { out.Buf, err = o.marshalMessageSlow(b, m) } if err != nil { return out, err } if allowPartial { return out, nil } return out, checkInitialized(m) } func (o MarshalOptions) marshalMessage(b []byte, m protoreflect.Message) ([]byte, error) { out, err := o.marshal(b, m) return out.Buf, err } // growcap scales up the capacity of a slice. // // Given a slice with a current capacity of oldcap and a desired // capacity of wantcap, growcap returns a new capacity >= wantcap. // // The algorithm is mostly identical to the one used by append as of Go 1.14. func growcap(oldcap, wantcap int) (newcap int) { if wantcap > oldcap*2 { newcap = wantcap } else if oldcap < 1024 { // The Go 1.14 runtime takes this case when len(s) < 1024, // not when cap(s) < 1024. The difference doesn't seem // significant here. newcap = oldcap * 2 } else { newcap = oldcap for 0 < newcap && newcap < wantcap { newcap += newcap / 4 } if newcap <= 0 { newcap = wantcap } } return newcap } func (o MarshalOptions) marshalMessageSlow(b []byte, m protoreflect.Message) ([]byte, error) { if messageset.IsMessageSet(m.Descriptor()) { return o.marshalMessageSet(b, m) } fieldOrder := order.AnyFieldOrder if o.Deterministic { // TODO: This should use a more natural ordering like NumberFieldOrder, // but doing so breaks golden tests that make invalid assumption about // output stability of this implementation. fieldOrder = order.LegacyFieldOrder } var err error order.RangeFields(m, fieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { b, err = o.marshalField(b, fd, v) return err == nil }) if err != nil { return b, err } b = append(b, m.GetUnknown()...) return b, nil } func (o MarshalOptions) marshalField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) { switch { case fd.IsList(): return o.marshalList(b, fd, value.List()) case fd.IsMap(): return o.marshalMap(b, fd, value.Map()) default: b = protowire.AppendTag(b, fd.Number(), wireTypes[fd.Kind()]) return o.marshalSingular(b, fd, value) } } func (o MarshalOptions) marshalList(b []byte, fd protoreflect.FieldDescriptor, list protoreflect.List) ([]byte, error) { if fd.IsPacked() && list.Len() > 0 { b = protowire.AppendTag(b, fd.Number(), protowire.BytesType) b, pos := appendSpeculativeLength(b) for i, llen := 0, list.Len(); i < llen; i++ { var err error b, err = o.marshalSingular(b, fd, list.Get(i)) if err != nil { return b, err } } b = finishSpeculativeLength(b, pos) return b, nil } kind := fd.Kind() for i, llen := 0, list.Len(); i < llen; i++ { var err error b = protowire.AppendTag(b, fd.Number(), wireTypes[kind]) b, err = o.marshalSingular(b, fd, list.Get(i)) if err != nil { return b, err } } return b, nil } func (o MarshalOptions) marshalMap(b []byte, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) ([]byte, error) { keyf := fd.MapKey() valf := fd.MapValue() keyOrder := order.AnyKeyOrder if o.Deterministic { keyOrder = order.GenericKeyOrder } var err error order.RangeEntries(mapv, keyOrder, func(key protoreflect.MapKey, value protoreflect.Value) bool { b = protowire.AppendTag(b, fd.Number(), protowire.BytesType) var pos int b, pos = appendSpeculativeLength(b) b, err = o.marshalField(b, keyf, key.Value()) if err != nil { return false } b, err = o.marshalField(b, valf, value) if err != nil { return false } b = finishSpeculativeLength(b, pos) return true }) return b, err } // When encoding length-prefixed fields, we speculatively set aside some number of bytes // for the length, encode the data, and then encode the length (shifting the data if necessary // to make room). const speculativeLength = 1 func appendSpeculativeLength(b []byte) ([]byte, int) { pos := len(b) b = append(b, "\x00\x00\x00\x00"[:speculativeLength]...) return b, pos } func finishSpeculativeLength(b []byte, pos int) []byte { mlen := len(b) - pos - speculativeLength msiz := protowire.SizeVarint(uint64(mlen)) if msiz != speculativeLength { for i := 0; i < msiz-speculativeLength; i++ { b = append(b, 0) } copy(b[pos+msiz:], b[pos+speculativeLength:]) b = b[:pos+msiz+mlen] } protowire.AppendVarint(b[:pos], uint64(mlen)) return b }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/wrappers.go
// 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 proto // Bool stores v in a new bool value and returns a pointer to it. func Bool(v bool) *bool { return &v } // Int32 stores v in a new int32 value and returns a pointer to it. func Int32(v int32) *int32 { return &v } // Int64 stores v in a new int64 value and returns a pointer to it. func Int64(v int64) *int64 { return &v } // Float32 stores v in a new float32 value and returns a pointer to it. func Float32(v float32) *float32 { return &v } // Float64 stores v in a new float64 value and returns a pointer to it. func Float64(v float64) *float64 { return &v } // Uint32 stores v in a new uint32 value and returns a pointer to it. func Uint32(v uint32) *uint32 { return &v } // Uint64 stores v in a new uint64 value and returns a pointer to it. func Uint64(v uint64) *uint64 { return &v } // String stores v in a new string value and returns a pointer to it. func String(v string) *string { return &v }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/checkinit.go
// 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 proto import ( "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" ) // CheckInitialized returns an error if any required fields in m are not set. func CheckInitialized(m Message) error { // Treat a nil message interface as an "untyped" empty message, // which we assume to have no required fields. if m == nil { return nil } return checkInitialized(m.ProtoReflect()) } // CheckInitialized returns an error if any required fields in m are not set. func checkInitialized(m protoreflect.Message) error { if methods := protoMethods(m); methods != nil && methods.CheckInitialized != nil { _, err := methods.CheckInitialized(protoiface.CheckInitializedInput{ Message: m, }) return err } return checkInitializedSlow(m) } func checkInitializedSlow(m protoreflect.Message) error { md := m.Descriptor() fds := md.Fields() for i, nums := 0, md.RequiredNumbers(); i < nums.Len(); i++ { fd := fds.ByNumber(nums.Get(i)) if !m.Has(fd) { return errors.RequiredNotSet(string(fd.FullName())) } } var err error m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { switch { case fd.IsList(): if fd.Message() == nil { return true } for i, list := 0, v.List(); i < list.Len() && err == nil; i++ { err = checkInitialized(list.Get(i).Message()) } case fd.IsMap(): if fd.MapValue().Message() == nil { return true } v.Map().Range(func(key protoreflect.MapKey, v protoreflect.Value) bool { err = checkInitialized(v.Message()) return err == nil }) default: if fd.Message() == nil { return true } err = checkInitialized(v.Message()) } return err == nil }) return err }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/merge.go
// 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 proto import ( "fmt" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" ) // Merge merges src into dst, which must be a message with the same descriptor. // // Populated scalar fields in src are copied to dst, while populated // singular messages in src are merged into dst by recursively calling Merge. // The elements of every list field in src is appended to the corresponded // list fields in dst. The entries of every map field in src is copied into // the corresponding map field in dst, possibly replacing existing entries. // The unknown fields of src are appended to the unknown fields of dst. // // It is semantically equivalent to unmarshaling the encoded form of src // into dst with the UnmarshalOptions.Merge option specified. func Merge(dst, src Message) { // TODO: Should nil src be treated as semantically equivalent to a // untyped, read-only, empty message? What about a nil dst? dstMsg, srcMsg := dst.ProtoReflect(), src.ProtoReflect() if dstMsg.Descriptor() != srcMsg.Descriptor() { if got, want := dstMsg.Descriptor().FullName(), srcMsg.Descriptor().FullName(); got != want { panic(fmt.Sprintf("descriptor mismatch: %v != %v", got, want)) } panic("descriptor mismatch") } mergeOptions{}.mergeMessage(dstMsg, srcMsg) } // Clone returns a deep copy of m. // If the top-level message is invalid, it returns an invalid message as well. func Clone(m Message) Message { // NOTE: Most usages of Clone assume the following properties: // t := reflect.TypeOf(m) // t == reflect.TypeOf(m.ProtoReflect().New().Interface()) // t == reflect.TypeOf(m.ProtoReflect().Type().Zero().Interface()) // // Embedding protobuf messages breaks this since the parent type will have // a forwarded ProtoReflect method, but the Interface method will return // the underlying embedded message type. if m == nil { return nil } src := m.ProtoReflect() if !src.IsValid() { return src.Type().Zero().Interface() } dst := src.New() mergeOptions{}.mergeMessage(dst, src) return dst.Interface() } // mergeOptions provides a namespace for merge functions, and can be // exported in the future if we add user-visible merge options. type mergeOptions struct{} func (o mergeOptions) mergeMessage(dst, src protoreflect.Message) { methods := protoMethods(dst) if methods != nil && methods.Merge != nil { in := protoiface.MergeInput{ Destination: dst, Source: src, } out := methods.Merge(in) if out.Flags&protoiface.MergeComplete != 0 { return } } if !dst.IsValid() { panic(fmt.Sprintf("cannot merge into invalid %v message", dst.Descriptor().FullName())) } src.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { switch { case fd.IsList(): o.mergeList(dst.Mutable(fd).List(), v.List(), fd) case fd.IsMap(): o.mergeMap(dst.Mutable(fd).Map(), v.Map(), fd.MapValue()) case fd.Message() != nil: o.mergeMessage(dst.Mutable(fd).Message(), v.Message()) case fd.Kind() == protoreflect.BytesKind: dst.Set(fd, o.cloneBytes(v)) default: dst.Set(fd, v) } return true }) if len(src.GetUnknown()) > 0 { dst.SetUnknown(append(dst.GetUnknown(), src.GetUnknown()...)) } } func (o mergeOptions) mergeList(dst, src protoreflect.List, fd protoreflect.FieldDescriptor) { // Merge semantics appends to the end of the existing list. for i, n := 0, src.Len(); i < n; i++ { switch v := src.Get(i); { case fd.Message() != nil: dstv := dst.NewElement() o.mergeMessage(dstv.Message(), v.Message()) dst.Append(dstv) case fd.Kind() == protoreflect.BytesKind: dst.Append(o.cloneBytes(v)) default: dst.Append(v) } } } func (o mergeOptions) mergeMap(dst, src protoreflect.Map, fd protoreflect.FieldDescriptor) { // Merge semantics replaces, rather than merges into existing entries. src.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { switch { case fd.Message() != nil: dstv := dst.NewValue() o.mergeMessage(dstv.Message(), v.Message()) dst.Set(k, dstv) case fd.Kind() == protoreflect.BytesKind: dst.Set(k, o.cloneBytes(v)) default: dst.Set(k, v) } return true }) } func (o mergeOptions) cloneBytes(v protoreflect.Value) protoreflect.Value { return protoreflect.ValueOfBytes(append([]byte{}, v.Bytes()...)) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/doc.go
// 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 proto provides functions operating on protocol buffer messages. // // For documentation on protocol buffers in general, see: // // https://developers.google.com/protocol-buffers // // For a tutorial on using protocol buffers with Go, see: // // https://developers.google.com/protocol-buffers/docs/gotutorial // // For a guide to generated Go protocol buffer code, see: // // https://developers.google.com/protocol-buffers/docs/reference/go-generated // // // Binary serialization // // This package contains functions to convert to and from the wire format, // an efficient binary serialization of protocol buffers. // // • Size reports the size of a message in the wire format. // // • Marshal converts a message to the wire format. // The MarshalOptions type provides more control over wire marshaling. // // • Unmarshal converts a message from the wire format. // The UnmarshalOptions type provides more control over wire unmarshaling. // // // Basic message operations // // • Clone makes a deep copy of a message. // // • Merge merges the content of a message into another. // // • Equal compares two messages. For more control over comparisons // and detailed reporting of differences, see package // "google.golang.org/protobuf/testing/protocmp". // // • Reset clears the content of a message. // // • CheckInitialized reports whether all required fields in a message are set. // // // Optional scalar constructors // // The API for some generated messages represents optional scalar fields // as pointers to a value. For example, an optional string field has the // Go type *string. // // • Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, and String // take a value and return a pointer to a new instance of it, // to simplify construction of optional field values. // // Generated enum types usually have an Enum method which performs the // same operation. // // Optional scalar fields are only supported in proto2. // // // Extension accessors // // • HasExtension, GetExtension, SetExtension, and ClearExtension // access extension field values in a protocol buffer message. // // Extension fields are only supported in proto2. // // // Related packages // // • Package "google.golang.org/protobuf/encoding/protojson" converts messages to // and from JSON. // // • Package "google.golang.org/protobuf/encoding/prototext" converts messages to // and from the text format. // // • Package "google.golang.org/protobuf/reflect/protoreflect" provides a // reflection interface for protocol buffer data types. // // • Package "google.golang.org/protobuf/testing/protocmp" provides features // to compare protocol buffer messages with the "github.com/google/go-cmp/cmp" // package. // // • Package "google.golang.org/protobuf/types/dynamicpb" provides a dynamic // message type, suitable for working with messages where the protocol buffer // type is only known at runtime. // // This module contains additional packages for more specialized use cases. // Consult the individual package documentation for details. package proto
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/proto_methods.go
// 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. // The protoreflect build tag disables use of fast-path methods. // +build !protoreflect package proto import ( "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" ) const hasProtoMethods = true func protoMethods(m protoreflect.Message) *protoiface.Methods { return m.ProtoMethods() }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/decode_gen.go
// 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. // Code generated by generate-types. DO NOT EDIT. package proto import ( "math" "unicode/utf8" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/reflect/protoreflect" ) // unmarshalScalar decodes a value of the given kind. // // Message values are decoded into a []byte which aliases the input data. func (o UnmarshalOptions) unmarshalScalar(b []byte, wtyp protowire.Type, fd protoreflect.FieldDescriptor) (val protoreflect.Value, n int, err error) { switch fd.Kind() { case protoreflect.BoolKind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfBool(protowire.DecodeBool(v)), n, nil case protoreflect.EnumKind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)), n, nil case protoreflect.Int32Kind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfInt32(int32(v)), n, nil case protoreflect.Sint32Kind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))), n, nil case protoreflect.Uint32Kind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfUint32(uint32(v)), n, nil case protoreflect.Int64Kind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfInt64(int64(v)), n, nil case protoreflect.Sint64Kind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)), n, nil case protoreflect.Uint64Kind: if wtyp != protowire.VarintType { return val, 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfUint64(v), n, nil case protoreflect.Sfixed32Kind: if wtyp != protowire.Fixed32Type { return val, 0, errUnknown } v, n := protowire.ConsumeFixed32(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfInt32(int32(v)), n, nil case protoreflect.Fixed32Kind: if wtyp != protowire.Fixed32Type { return val, 0, errUnknown } v, n := protowire.ConsumeFixed32(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfUint32(uint32(v)), n, nil case protoreflect.FloatKind: if wtyp != protowire.Fixed32Type { return val, 0, errUnknown } v, n := protowire.ConsumeFixed32(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))), n, nil case protoreflect.Sfixed64Kind: if wtyp != protowire.Fixed64Type { return val, 0, errUnknown } v, n := protowire.ConsumeFixed64(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfInt64(int64(v)), n, nil case protoreflect.Fixed64Kind: if wtyp != protowire.Fixed64Type { return val, 0, errUnknown } v, n := protowire.ConsumeFixed64(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfUint64(v), n, nil case protoreflect.DoubleKind: if wtyp != protowire.Fixed64Type { return val, 0, errUnknown } v, n := protowire.ConsumeFixed64(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfFloat64(math.Float64frombits(v)), n, nil case protoreflect.StringKind: if wtyp != protowire.BytesType { return val, 0, errUnknown } v, n := protowire.ConsumeBytes(b) if n < 0 { return val, 0, errDecode } if strs.EnforceUTF8(fd) && !utf8.Valid(v) { return protoreflect.Value{}, 0, errors.InvalidUTF8(string(fd.FullName())) } return protoreflect.ValueOfString(string(v)), n, nil case protoreflect.BytesKind: if wtyp != protowire.BytesType { return val, 0, errUnknown } v, n := protowire.ConsumeBytes(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfBytes(append(emptyBuf[:], v...)), n, nil case protoreflect.MessageKind: if wtyp != protowire.BytesType { return val, 0, errUnknown } v, n := protowire.ConsumeBytes(b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfBytes(v), n, nil case protoreflect.GroupKind: if wtyp != protowire.StartGroupType { return val, 0, errUnknown } v, n := protowire.ConsumeGroup(fd.Number(), b) if n < 0 { return val, 0, errDecode } return protoreflect.ValueOfBytes(v), n, nil default: return val, 0, errUnknown } } func (o UnmarshalOptions) unmarshalList(b []byte, wtyp protowire.Type, list protoreflect.List, fd protoreflect.FieldDescriptor) (n int, err error) { switch fd.Kind() { case protoreflect.BoolKind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v))) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v))) return n, nil case protoreflect.EnumKind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v))) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v))) return n, nil case protoreflect.Int32Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfInt32(int32(v))) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfInt32(int32(v))) return n, nil case protoreflect.Sint32Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32)))) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32)))) return n, nil case protoreflect.Uint32Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfUint32(uint32(v))) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfUint32(uint32(v))) return n, nil case protoreflect.Int64Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfInt64(int64(v))) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfInt64(int64(v))) return n, nil case protoreflect.Sint64Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v))) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v))) return n, nil case protoreflect.Uint64Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeVarint(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfUint64(v)) } return n, nil } if wtyp != protowire.VarintType { return 0, errUnknown } v, n := protowire.ConsumeVarint(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfUint64(v)) return n, nil case protoreflect.Sfixed32Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeFixed32(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfInt32(int32(v))) } return n, nil } if wtyp != protowire.Fixed32Type { return 0, errUnknown } v, n := protowire.ConsumeFixed32(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfInt32(int32(v))) return n, nil case protoreflect.Fixed32Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeFixed32(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfUint32(uint32(v))) } return n, nil } if wtyp != protowire.Fixed32Type { return 0, errUnknown } v, n := protowire.ConsumeFixed32(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfUint32(uint32(v))) return n, nil case protoreflect.FloatKind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeFixed32(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v)))) } return n, nil } if wtyp != protowire.Fixed32Type { return 0, errUnknown } v, n := protowire.ConsumeFixed32(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v)))) return n, nil case protoreflect.Sfixed64Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeFixed64(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfInt64(int64(v))) } return n, nil } if wtyp != protowire.Fixed64Type { return 0, errUnknown } v, n := protowire.ConsumeFixed64(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfInt64(int64(v))) return n, nil case protoreflect.Fixed64Kind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeFixed64(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfUint64(v)) } return n, nil } if wtyp != protowire.Fixed64Type { return 0, errUnknown } v, n := protowire.ConsumeFixed64(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfUint64(v)) return n, nil case protoreflect.DoubleKind: if wtyp == protowire.BytesType { buf, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } for len(buf) > 0 { v, n := protowire.ConsumeFixed64(buf) if n < 0 { return 0, errDecode } buf = buf[n:] list.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v))) } return n, nil } if wtyp != protowire.Fixed64Type { return 0, errUnknown } v, n := protowire.ConsumeFixed64(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v))) return n, nil case protoreflect.StringKind: if wtyp != protowire.BytesType { return 0, errUnknown } v, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } if strs.EnforceUTF8(fd) && !utf8.Valid(v) { return 0, errors.InvalidUTF8(string(fd.FullName())) } list.Append(protoreflect.ValueOfString(string(v))) return n, nil case protoreflect.BytesKind: if wtyp != protowire.BytesType { return 0, errUnknown } v, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } list.Append(protoreflect.ValueOfBytes(append(emptyBuf[:], v...))) return n, nil case protoreflect.MessageKind: if wtyp != protowire.BytesType { return 0, errUnknown } v, n := protowire.ConsumeBytes(b) if n < 0 { return 0, errDecode } m := list.NewElement() if err := o.unmarshalMessage(v, m.Message()); err != nil { return 0, err } list.Append(m) return n, nil case protoreflect.GroupKind: if wtyp != protowire.StartGroupType { return 0, errUnknown } v, n := protowire.ConsumeGroup(fd.Number(), b) if n < 0 { return 0, errDecode } m := list.NewElement() if err := o.unmarshalMessage(v, m.Message()); err != nil { return 0, err } list.Append(m) return n, nil default: return 0, errUnknown } } // We append to an empty array rather than a nil []byte to get non-nil zero-length byte slices. var emptyBuf [0]byte
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/size_gen.go
// 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. // Code generated by generate-types. DO NOT EDIT. package proto import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/reflect/protoreflect" ) func (o MarshalOptions) sizeSingular(num protowire.Number, kind protoreflect.Kind, v protoreflect.Value) int { switch kind { case protoreflect.BoolKind: return protowire.SizeVarint(protowire.EncodeBool(v.Bool())) case protoreflect.EnumKind: return protowire.SizeVarint(uint64(v.Enum())) case protoreflect.Int32Kind: return protowire.SizeVarint(uint64(int32(v.Int()))) case protoreflect.Sint32Kind: return protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int())))) case protoreflect.Uint32Kind: return protowire.SizeVarint(uint64(uint32(v.Uint()))) case protoreflect.Int64Kind: return protowire.SizeVarint(uint64(v.Int())) case protoreflect.Sint64Kind: return protowire.SizeVarint(protowire.EncodeZigZag(v.Int())) case protoreflect.Uint64Kind: return protowire.SizeVarint(v.Uint()) case protoreflect.Sfixed32Kind: return protowire.SizeFixed32() case protoreflect.Fixed32Kind: return protowire.SizeFixed32() case protoreflect.FloatKind: return protowire.SizeFixed32() case protoreflect.Sfixed64Kind: return protowire.SizeFixed64() case protoreflect.Fixed64Kind: return protowire.SizeFixed64() case protoreflect.DoubleKind: return protowire.SizeFixed64() case protoreflect.StringKind: return protowire.SizeBytes(len(v.String())) case protoreflect.BytesKind: return protowire.SizeBytes(len(v.Bytes())) case protoreflect.MessageKind: return protowire.SizeBytes(o.size(v.Message())) case protoreflect.GroupKind: return protowire.SizeGroup(num, o.size(v.Message())) default: return 0 } }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/reset.go
// 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 proto import ( "fmt" "google.golang.org/protobuf/reflect/protoreflect" ) // Reset clears every field in the message. // The resulting message shares no observable memory with its previous state // other than the memory for the message itself. func Reset(m Message) { if mr, ok := m.(interface{ Reset() }); ok && hasProtoMethods { mr.Reset() return } resetMessage(m.ProtoReflect()) } func resetMessage(m protoreflect.Message) { if !m.IsValid() { panic(fmt.Sprintf("cannot reset invalid %v message", m.Descriptor().FullName())) } // Clear all known fields. fds := m.Descriptor().Fields() for i := 0; i < fds.Len(); i++ { m.Clear(fds.Get(i)) } // Clear extension fields. m.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { m.Clear(fd) return true }) // Clear unknown fields. m.SetUnknown(nil) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/proto/proto_reflect.go
// 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. // The protoreflect build tag disables use of fast-path methods. // +build protoreflect package proto import ( "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" ) const hasProtoMethods = false func protoMethods(m protoreflect.Message) *protoiface.Methods { return nil }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/errors/errors.go
// 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 errors implements functions to manipulate errors. package errors import ( "errors" "fmt" "google.golang.org/protobuf/internal/detrand" ) // Error is a sentinel matching all errors produced by this package. var Error = errors.New("protobuf error") // New formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. func New(f string, x ...interface{}) error { return &prefixError{s: format(f, x...)} } type prefixError struct{ s string } var prefix = func() string { // Deliberately introduce instability into the error message string to // discourage users from performing error string comparisons. if detrand.Bool() { return "proto: " // use non-breaking spaces (U+00a0) } else { return "proto: " // use regular spaces (U+0020) } }() func (e *prefixError) Error() string { return prefix + e.s } func (e *prefixError) Unwrap() error { return Error } // Wrap returns an error that has a "proto" prefix, the formatted string described // by the format specifier and arguments, and a suffix of err. The error wraps err. func Wrap(err error, f string, x ...interface{}) error { return &wrapError{ s: format(f, x...), err: err, } } type wrapError struct { s string err error } func (e *wrapError) Error() string { return format("%v%v: %v", prefix, e.s, e.err) } func (e *wrapError) Unwrap() error { return e.err } func (e *wrapError) Is(target error) bool { return target == Error } func format(f string, x ...interface{}) string { // avoid "proto: " prefix when chaining for i := 0; i < len(x); i++ { switch e := x[i].(type) { case *prefixError: x[i] = e.s case *wrapError: x[i] = format("%v: %v", e.s, e.err) } } return fmt.Sprintf(f, x...) } func InvalidUTF8(name string) error { return New("field %v contains invalid UTF-8", name) } func RequiredNotSet(name string) error { return New("required field %v not set", name) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/errors/is_go112.go
// 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. // +build !go1.13 package errors import "reflect" // Is is a copy of Go 1.13's errors.Is for use with older Go versions. func Is(err, target error) bool { if target == nil { return err == target } isComparable := reflect.TypeOf(target).Comparable() for { if isComparable && err == target { return true } if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { return true } if err = unwrap(err); err == nil { return false } } } func unwrap(err error) error { u, ok := err.(interface { Unwrap() error }) if !ok { return nil } return u.Unwrap() }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/errors/is_go113.go
// 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. // +build go1.13 package errors import "errors" // Is is errors.Is. func Is(err, target error) bool { return errors.Is(err, target) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go
// 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. // +build !purego,!appengine package strs import ( "unsafe" pref "google.golang.org/protobuf/reflect/protoreflect" ) type ( stringHeader struct { Data unsafe.Pointer Len int } sliceHeader struct { Data unsafe.Pointer Len int Cap int } ) // UnsafeString returns an unsafe string reference of b. // The caller must treat the input slice as immutable. // // WARNING: Use carefully. The returned result must not leak to the end user // unless the input slice is provably immutable. func UnsafeString(b []byte) (s string) { src := (*sliceHeader)(unsafe.Pointer(&b)) dst := (*stringHeader)(unsafe.Pointer(&s)) dst.Data = src.Data dst.Len = src.Len return s } // UnsafeBytes returns an unsafe bytes slice reference of s. // The caller must treat returned slice as immutable. // // WARNING: Use carefully. The returned result must not leak to the end user. func UnsafeBytes(s string) (b []byte) { src := (*stringHeader)(unsafe.Pointer(&s)) dst := (*sliceHeader)(unsafe.Pointer(&b)) dst.Data = src.Data dst.Len = src.Len dst.Cap = src.Len return b } // Builder builds a set of strings with shared lifetime. // This differs from strings.Builder, which is for building a single string. type Builder struct { buf []byte } // AppendFullName is equivalent to protoreflect.FullName.Append, // but optimized for large batches where each name has a shared lifetime. func (sb *Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { n := len(prefix) + len(".") + len(name) if len(prefix) == 0 { n -= len(".") } sb.grow(n) sb.buf = append(sb.buf, prefix...) sb.buf = append(sb.buf, '.') sb.buf = append(sb.buf, name...) return pref.FullName(sb.last(n)) } // MakeString is equivalent to string(b), but optimized for large batches // with a shared lifetime. func (sb *Builder) MakeString(b []byte) string { sb.grow(len(b)) sb.buf = append(sb.buf, b...) return sb.last(len(b)) } func (sb *Builder) grow(n int) { if cap(sb.buf)-len(sb.buf) >= n { return } // Unlike strings.Builder, we do not need to copy over the contents // of the old buffer since our builder provides no API for // retrieving previously created strings. sb.buf = make([]byte, 2*(cap(sb.buf)+n)) } func (sb *Builder) last(n int) string { return UnsafeString(sb.buf[len(sb.buf)-n:]) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
// 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. // +build purego appengine package strs import pref "google.golang.org/protobuf/reflect/protoreflect" func UnsafeString(b []byte) string { return string(b) } func UnsafeBytes(s string) []byte { return []byte(s) } type Builder struct{} func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { return prefix.Append(name) } func (*Builder) MakeString(b []byte) string { return string(b) }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/strs/strings.go
// 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 strs provides string manipulation functionality specific to protobuf. package strs import ( "go/token" "strings" "unicode" "unicode/utf8" "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/reflect/protoreflect" ) // EnforceUTF8 reports whether to enforce strict UTF-8 validation. func EnforceUTF8(fd protoreflect.FieldDescriptor) bool { if flags.ProtoLegacy { if fd, ok := fd.(interface{ EnforceUTF8() bool }); ok { return fd.EnforceUTF8() } } return fd.Syntax() == protoreflect.Proto3 } // GoCamelCase camel-cases a protobuf name for use as a Go identifier. // // If there is an interior underscore followed by a lower case letter, // drop the underscore and convert the letter to upper case. func GoCamelCase(s string) string { // Invariant: if the next letter is lower case, it must be converted // to upper case. // That is, we process a word at a time, where words are marked by _ or // upper case letter. Digits are treated as words. var b []byte for i := 0; i < len(s); i++ { c := s[i] switch { case c == '.' && i+1 < len(s) && isASCIILower(s[i+1]): // Skip over '.' in ".{{lowercase}}". case c == '.': b = append(b, '_') // convert '.' to '_' case c == '_' && (i == 0 || s[i-1] == '.'): // Convert initial '_' to ensure we start with a capital letter. // Do the same for '_' after '.' to match historic behavior. b = append(b, 'X') // convert '_' to 'X' case c == '_' && i+1 < len(s) && isASCIILower(s[i+1]): // Skip over '_' in "_{{lowercase}}". case isASCIIDigit(c): b = append(b, c) default: // Assume we have a letter now - if not, it's a bogus identifier. // The next word is a sequence of characters that must start upper case. if isASCIILower(c) { c -= 'a' - 'A' // convert lowercase to uppercase } b = append(b, c) // Accept lower case sequence that follows. for ; i+1 < len(s) && isASCIILower(s[i+1]); i++ { b = append(b, s[i+1]) } } } return string(b) } // GoSanitized converts a string to a valid Go identifier. func GoSanitized(s string) string { // Sanitize the input to the set of valid characters, // which must be '_' or be in the Unicode L or N categories. s = strings.Map(func(r rune) rune { if unicode.IsLetter(r) || unicode.IsDigit(r) { return r } return '_' }, s) // Prepend '_' in the event of a Go keyword conflict or if // the identifier is invalid (does not start in the Unicode L category). r, _ := utf8.DecodeRuneInString(s) if token.Lookup(s).IsKeyword() || !unicode.IsLetter(r) { return "_" + s } return s } // JSONCamelCase converts a snake_case identifier to a camelCase identifier, // according to the protobuf JSON specification. func JSONCamelCase(s string) string { var b []byte var wasUnderscore bool for i := 0; i < len(s); i++ { // proto identifiers are always ASCII c := s[i] if c != '_' { if wasUnderscore && isASCIILower(c) { c -= 'a' - 'A' // convert to uppercase } b = append(b, c) } wasUnderscore = c == '_' } return string(b) } // JSONSnakeCase converts a camelCase identifier to a snake_case identifier, // according to the protobuf JSON specification. func JSONSnakeCase(s string) string { var b []byte for i := 0; i < len(s); i++ { // proto identifiers are always ASCII c := s[i] if isASCIIUpper(c) { b = append(b, '_') c += 'a' - 'A' // convert to lowercase } b = append(b, c) } return string(b) } // MapEntryName derives the name of the map entry message given the field name. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:254-276,6057 func MapEntryName(s string) string { var b []byte upperNext := true for _, c := range s { switch { case c == '_': upperNext = true case upperNext: b = append(b, byte(unicode.ToUpper(c))) upperNext = false default: b = append(b, byte(c)) } } b = append(b, "Entry"...) return string(b) } // EnumValueName derives the camel-cased enum value name. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:297-313 func EnumValueName(s string) string { var b []byte upperNext := true for _, c := range s { switch { case c == '_': upperNext = true case upperNext: b = append(b, byte(unicode.ToUpper(c))) upperNext = false default: b = append(b, byte(unicode.ToLower(c))) upperNext = false } } return string(b) } // TrimEnumPrefix trims the enum name prefix from an enum value name, // where the prefix is all lowercase without underscores. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:330-375 func TrimEnumPrefix(s, prefix string) string { s0 := s // original input for len(s) > 0 && len(prefix) > 0 { if s[0] == '_' { s = s[1:] continue } if unicode.ToLower(rune(s[0])) != rune(prefix[0]) { return s0 // no prefix match } s, prefix = s[1:], prefix[1:] } if len(prefix) > 0 { return s0 // no prefix match } s = strings.TrimLeft(s, "_") if len(s) == 0 { return s0 // avoid returning empty string } return s } func isASCIILower(c byte) bool { return 'a' <= c && c <= 'z' } func isASCIIUpper(c byte) bool { return 'A' <= c && c <= 'Z' } func isASCIIDigit(c byte) bool { return '0' <= c && c <= '9' }
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/flags/flags.go
// 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 flags provides a set of flags controlled by build tags. package flags // ProtoLegacy specifies whether to enable support for legacy functionality // such as MessageSets, weak fields, and various other obscure behavior // that is necessary to maintain backwards compatibility with proto1 or // the pre-release variants of proto2 and proto3. // // This is disabled by default unless built with the "protolegacy" tag. // // WARNING: The compatibility agreement covers nothing provided by this flag. // As such, functionality may suddenly be removed or changed at our discretion. const ProtoLegacy = protoLegacy // LazyUnmarshalExtensions specifies whether to lazily unmarshal extensions. // // Lazy extension unmarshaling validates the contents of message-valued // extension fields at unmarshal time, but defers creating the message // structure until the extension is first accessed. const LazyUnmarshalExtensions = ProtoLegacy
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
// 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. // +build !protolegacy package flags const protoLegacy = false
0
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal
rapidsai_public_repos/roc/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
// 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. // +build protolegacy package flags const protoLegacy = true
0