repo_id
stringclasses
927 values
file_path
stringlengths
99
214
content
stringlengths
2
4.15M
blobstore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/blobstore/read.go
// Copyright 2012 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 blobstore import ( "context" "errors" "fmt" "io" "os" "sync" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" blobpb "google.golang.org/appengine/v2/internal/blobstore" ) // openBlob returns a reader for a blob. It always succeeds; if the blob does // not exist then an error will be reported upon first read. func openBlob(c context.Context, blobKey appengine.BlobKey) Reader { return &reader{ c: c, blobKey: blobKey, } } const readBufferSize = 256 * 1024 // reader is a blob reader. It implements the Reader interface. type reader struct { c context.Context // Either blobKey or filename is set: blobKey appengine.BlobKey filename string closeFunc func() // is nil if unavailable or already closed. // buf is the read buffer. r is how much of buf has been read. // off is the offset of buf[0] relative to the start of the blob. // An invariant is 0 <= r && r <= len(buf). // Reads that don't require an RPC call will increment r but not off. // Seeks may modify r without discarding the buffer, but only if the // invariant can be maintained. mu sync.Mutex buf []byte r int off int64 } func (r *reader) Close() error { if f := r.closeFunc; f != nil { f() } r.closeFunc = nil return nil } func (r *reader) Read(p []byte) (int, error) { if len(p) == 0 { return 0, nil } r.mu.Lock() defer r.mu.Unlock() if r.r == len(r.buf) { if err := r.fetch(r.off + int64(r.r)); err != nil { return 0, err } } n := copy(p, r.buf[r.r:]) r.r += n return n, nil } func (r *reader) ReadAt(p []byte, off int64) (int, error) { if len(p) == 0 { return 0, nil } r.mu.Lock() defer r.mu.Unlock() // Convert relative offsets to absolute offsets. ab0 := r.off + int64(r.r) ab1 := r.off + int64(len(r.buf)) ap0 := off ap1 := off + int64(len(p)) // Check if we can satisfy the read entirely out of the existing buffer. if r.off <= ap0 && ap1 <= ab1 { // Convert off from an absolute offset to a relative offset. rp0 := int(ap0 - r.off) return copy(p, r.buf[rp0:]), nil } // Restore the original Read/Seek offset after ReadAt completes. defer r.seek(ab0) // Repeatedly fetch and copy until we have filled p. n := 0 for len(p) > 0 { if err := r.fetch(off + int64(n)); err != nil { return n, err } r.r = copy(p, r.buf) n += r.r p = p[r.r:] } return n, nil } func (r *reader) Seek(offset int64, whence int) (ret int64, err error) { r.mu.Lock() defer r.mu.Unlock() switch whence { case os.SEEK_SET: ret = offset case os.SEEK_CUR: ret = r.off + int64(r.r) + offset case os.SEEK_END: return 0, errors.New("seeking relative to the end of a blob isn't supported") default: return 0, fmt.Errorf("invalid Seek whence value: %d", whence) } if ret < 0 { return 0, errors.New("negative Seek offset") } return r.seek(ret) } // fetch fetches readBufferSize bytes starting at the given offset. On success, // the data is saved as r.buf. func (r *reader) fetch(off int64) error { req := &blobpb.FetchDataRequest{ BlobKey: proto.String(string(r.blobKey)), StartIndex: proto.Int64(off), EndIndex: proto.Int64(off + readBufferSize - 1), // EndIndex is inclusive. } res := &blobpb.FetchDataResponse{} if err := internal.Call(r.c, "blobstore", "FetchData", req, res); err != nil { return err } if len(res.Data) == 0 { return io.EOF } r.buf, r.r, r.off = res.Data, 0, off return nil } // seek seeks to the given offset with an effective whence equal to SEEK_SET. // It discards the read buffer if the invariant cannot be maintained. func (r *reader) seek(off int64) (int64, error) { delta := off - r.off if delta >= 0 && delta < int64(len(r.buf)) { r.r = int(delta) return off, nil } r.buf, r.r, r.off = nil, 0, off return off, nil }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/prop.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 datastore import ( "fmt" "reflect" "strings" "sync" "unicode" ) // Entities with more than this many indexed properties will not be saved. const maxIndexedProperties = 20000 // []byte fields more than 1 megabyte long will not be loaded or saved. const maxBlobLen = 1 << 20 // Property is a name/value pair plus some metadata. A datastore entity's // contents are loaded and saved as a sequence of Properties. An entity can // have multiple Properties with the same name, provided that p.Multiple is // true on all of that entity's Properties with that name. type Property struct { // Name is the property name. Name string // Value is the property value. The valid types are: // - int64 // - bool // - string // - float64 // - ByteString // - *Key // - time.Time // - appengine.BlobKey // - appengine.GeoPoint // - []byte (up to 1 megabyte in length) // - *Entity (representing a nested struct) // This set is smaller than the set of valid struct field types that the // datastore can load and save. A Property Value cannot be a slice (apart // from []byte); use multiple Properties instead. Also, a Value's type // must be explicitly on the list above; it is not sufficient for the // underlying type to be on that list. For example, a Value of "type // myInt64 int64" is invalid. Smaller-width integers and floats are also // invalid. Again, this is more restrictive than the set of valid struct // field types. // // A Value will have an opaque type when loading entities from an index, // such as via a projection query. Load entities into a struct instead // of a PropertyLoadSaver when using a projection query. // // A Value may also be the nil interface value; this is equivalent to // Python's None but not directly representable by a Go struct. Loading // a nil-valued property into a struct will set that field to the zero // value. Value interface{} // NoIndex is whether the datastore cannot index this property. NoIndex bool // Multiple is whether the entity can have multiple properties with // the same name. Even if a particular instance only has one property with // a certain name, Multiple should be true if a struct would best represent // it as a field of type []T instead of type T. Multiple bool } // An Entity is the value type for a nested struct. // This type is only used for a Property's Value. type Entity struct { Key *Key Properties []Property } // ByteString is a short byte slice (up to 1500 bytes) that can be indexed. type ByteString []byte // PropertyLoadSaver can be converted from and to a slice of Properties. type PropertyLoadSaver interface { Load([]Property) error Save() ([]Property, error) } // PropertyList converts a []Property to implement PropertyLoadSaver. type PropertyList []Property var ( typeOfPropertyLoadSaver = reflect.TypeOf((*PropertyLoadSaver)(nil)).Elem() typeOfPropertyList = reflect.TypeOf(PropertyList(nil)) ) // Load loads all of the provided properties into l. // It does not first reset *l to an empty slice. func (l *PropertyList) Load(p []Property) error { *l = append(*l, p...) return nil } // Save saves all of l's properties as a slice or Properties. func (l *PropertyList) Save() ([]Property, error) { return *l, nil } // validPropertyName returns whether name consists of one or more valid Go // identifiers joined by ".". func validPropertyName(name string) bool { if name == "" { return false } for _, s := range strings.Split(name, ".") { if s == "" { return false } first := true for _, c := range s { if first { first = false if c != '_' && !unicode.IsLetter(c) { return false } } else { if c != '_' && !unicode.IsLetter(c) && !unicode.IsDigit(c) { return false } } } } return true } // structCodec describes how to convert a struct to and from a sequence of // properties. type structCodec struct { // fields gives the field codec for the structTag with the given name. fields map[string]fieldCodec // hasSlice is whether a struct or any of its nested or embedded structs // has a slice-typed field (other than []byte). hasSlice bool // keyField is the index of a *Key field with structTag __key__. // This field is not relevant for the top level struct, only for // nested structs. keyField int // complete is whether the structCodec is complete. An incomplete // structCodec may be encountered when walking a recursive struct. complete bool } // fieldCodec is a struct field's index and, if that struct field's type is // itself a struct, that substruct's structCodec. type fieldCodec struct { // path is the index path to the field path []int noIndex bool // omitEmpty indicates that the field should be omitted on save // if empty. omitEmpty bool // structCodec is the codec fot the struct field at index 'path', // or nil if the field is not a struct. structCodec *structCodec } // structCodecs collects the structCodecs that have already been calculated. var ( structCodecsMutex sync.Mutex structCodecs = make(map[reflect.Type]*structCodec) ) // getStructCodec returns the structCodec for the given struct type. func getStructCodec(t reflect.Type) (*structCodec, error) { structCodecsMutex.Lock() defer structCodecsMutex.Unlock() return getStructCodecLocked(t) } // getStructCodecLocked implements getStructCodec. The structCodecsMutex must // be held when calling this function. func getStructCodecLocked(t reflect.Type) (ret *structCodec, retErr error) { c, ok := structCodecs[t] if ok { return c, nil } c = &structCodec{ fields: make(map[string]fieldCodec), // We initialize keyField to -1 so that the zero-value is not // misinterpreted as index 0. keyField: -1, } // Add c to the structCodecs map before we are sure it is good. If t is // a recursive type, it needs to find the incomplete entry for itself in // the map. structCodecs[t] = c defer func() { if retErr != nil { delete(structCodecs, t) } }() for i := 0; i < t.NumField(); i++ { f := t.Field(i) // Skip unexported fields. // Note that if f is an anonymous, unexported struct field, // we will promote its fields. if f.PkgPath != "" && !f.Anonymous { continue } tags := strings.Split(f.Tag.Get("datastore"), ",") name := tags[0] opts := make(map[string]bool) for _, t := range tags[1:] { opts[t] = true } switch { case name == "": if !f.Anonymous { name = f.Name } case name == "-": continue case name == "__key__": if f.Type != typeOfKeyPtr { return nil, fmt.Errorf("datastore: __key__ field on struct %v is not a *datastore.Key", t) } c.keyField = i case !validPropertyName(name): return nil, fmt.Errorf("datastore: struct tag has invalid property name: %q", name) } substructType, fIsSlice := reflect.Type(nil), false switch f.Type.Kind() { case reflect.Struct: substructType = f.Type case reflect.Slice: if f.Type.Elem().Kind() == reflect.Struct { substructType = f.Type.Elem() } fIsSlice = f.Type != typeOfByteSlice c.hasSlice = c.hasSlice || fIsSlice } var sub *structCodec if substructType != nil && substructType != typeOfTime && substructType != typeOfGeoPoint { var err error sub, err = getStructCodecLocked(substructType) if err != nil { return nil, err } if !sub.complete { return nil, fmt.Errorf("datastore: recursive struct: field %q", f.Name) } if fIsSlice && sub.hasSlice { return nil, fmt.Errorf( "datastore: flattening nested structs leads to a slice of slices: field %q", f.Name) } c.hasSlice = c.hasSlice || sub.hasSlice // If f is an anonymous struct field, we promote the substruct's fields up to this level // in the linked list of struct codecs. if f.Anonymous { for subname, subfield := range sub.fields { if name != "" { subname = name + "." + subname } if _, ok := c.fields[subname]; ok { return nil, fmt.Errorf("datastore: struct tag has repeated property name: %q", subname) } c.fields[subname] = fieldCodec{ path: append([]int{i}, subfield.path...), noIndex: subfield.noIndex || opts["noindex"], omitEmpty: subfield.omitEmpty, structCodec: subfield.structCodec, } } continue } } if _, ok := c.fields[name]; ok { return nil, fmt.Errorf("datastore: struct tag has repeated property name: %q", name) } c.fields[name] = fieldCodec{ path: []int{i}, noIndex: opts["noindex"], omitEmpty: opts["omitempty"], structCodec: sub, } } c.complete = true return c, nil } // structPLS adapts a struct to be a PropertyLoadSaver. type structPLS struct { v reflect.Value codec *structCodec } // newStructPLS returns a structPLS, which implements the // PropertyLoadSaver interface, for the struct pointer p. func newStructPLS(p interface{}) (*structPLS, error) { v := reflect.ValueOf(p) if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { return nil, ErrInvalidEntityType } v = v.Elem() codec, err := getStructCodec(v.Type()) if err != nil { return nil, err } return &structPLS{v, codec}, nil } // LoadStruct loads the properties from p to dst. // dst must be a struct pointer. func LoadStruct(dst interface{}, p []Property) error { x, err := newStructPLS(dst) if err != nil { return err } return x.Load(p) } // SaveStruct returns the properties from src as a slice of Properties. // src must be a struct pointer. func SaveStruct(src interface{}) ([]Property, error) { x, err := newStructPLS(src) if err != nil { return nil, err } return x.Save() }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/save.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 datastore import ( "errors" "fmt" "math" "reflect" "time" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" pb "google.golang.org/appengine/v2/internal/datastore" ) func toUnixMicro(t time.Time) int64 { // We cannot use t.UnixNano() / 1e3 because we want to handle times more than // 2^63 nanoseconds (which is about 292 years) away from 1970, and those cannot // be represented in the numerator of a single int64 divide. return t.Unix()*1e6 + int64(t.Nanosecond()/1e3) } func fromUnixMicro(t int64) time.Time { return time.Unix(t/1e6, (t%1e6)*1e3).UTC() } var ( minTime = time.Unix(int64(math.MinInt64)/1e6, (int64(math.MinInt64)%1e6)*1e3) maxTime = time.Unix(int64(math.MaxInt64)/1e6, (int64(math.MaxInt64)%1e6)*1e3) ) // valueToProto converts a named value to a newly allocated Property. // The returned error string is empty on success. func valueToProto(defaultAppID, name string, v reflect.Value, multiple bool) (p *pb.Property, errStr string) { var ( pv pb.PropertyValue unsupported bool ) switch v.Kind() { case reflect.Invalid: // No-op. case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: pv.Int64Value = proto.Int64(v.Int()) case reflect.Bool: pv.BooleanValue = proto.Bool(v.Bool()) case reflect.String: pv.StringValue = proto.String(v.String()) case reflect.Float32, reflect.Float64: pv.DoubleValue = proto.Float64(v.Float()) case reflect.Ptr: if k, ok := v.Interface().(*Key); ok { if k != nil { pv.Referencevalue = keyToReferenceValue(defaultAppID, k) } } else { unsupported = true } case reflect.Struct: switch t := v.Interface().(type) { case time.Time: if t.Before(minTime) || t.After(maxTime) { return nil, "time value out of range" } pv.Int64Value = proto.Int64(toUnixMicro(t)) case appengine.GeoPoint: if !t.Valid() { return nil, "invalid GeoPoint value" } // NOTE: Strangely, latitude maps to X, longitude to Y. pv.Pointvalue = &pb.PropertyValue_PointValue{X: &t.Lat, Y: &t.Lng} default: unsupported = true } case reflect.Slice: if b, ok := v.Interface().([]byte); ok { pv.StringValue = proto.String(string(b)) } else { // nvToProto should already catch slice values. // If we get here, we have a slice of slice values. unsupported = true } default: unsupported = true } if unsupported { return nil, "unsupported datastore value type: " + v.Type().String() } p = &pb.Property{ Name: proto.String(name), Value: &pv, Multiple: proto.Bool(multiple), } if v.IsValid() { switch v.Interface().(type) { case []byte: p.Meaning = pb.Property_BLOB.Enum() case ByteString: p.Meaning = pb.Property_BYTESTRING.Enum() case appengine.BlobKey: p.Meaning = pb.Property_BLOBKEY.Enum() case time.Time: p.Meaning = pb.Property_GD_WHEN.Enum() case appengine.GeoPoint: p.Meaning = pb.Property_GEORSS_POINT.Enum() } } return p, "" } type saveOpts struct { noIndex bool multiple bool omitEmpty bool } // saveEntity saves an EntityProto into a PropertyLoadSaver or struct pointer. func saveEntity(defaultAppID string, key *Key, src interface{}) (*pb.EntityProto, error) { var err error var props []Property if e, ok := src.(PropertyLoadSaver); ok { props, err = e.Save() } else { props, err = SaveStruct(src) } if err != nil { return nil, err } return propertiesToProto(defaultAppID, key, props) } func saveStructProperty(props *[]Property, name string, opts saveOpts, v reflect.Value) error { if opts.omitEmpty && isEmptyValue(v) { return nil } p := Property{ Name: name, NoIndex: opts.noIndex, Multiple: opts.multiple, } switch x := v.Interface().(type) { case *Key: p.Value = x case time.Time: p.Value = x case appengine.BlobKey: p.Value = x case appengine.GeoPoint: p.Value = x case ByteString: p.Value = x default: switch v.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: p.Value = v.Int() case reflect.Bool: p.Value = v.Bool() case reflect.String: p.Value = v.String() case reflect.Float32, reflect.Float64: p.Value = v.Float() case reflect.Slice: if v.Type().Elem().Kind() == reflect.Uint8 { p.NoIndex = true p.Value = v.Bytes() } case reflect.Struct: if !v.CanAddr() { return fmt.Errorf("datastore: unsupported struct field: value is unaddressable") } sub, err := newStructPLS(v.Addr().Interface()) if err != nil { return fmt.Errorf("datastore: unsupported struct field: %v", err) } return sub.save(props, name+".", opts) } } if p.Value == nil { return fmt.Errorf("datastore: unsupported struct field type: %v", v.Type()) } *props = append(*props, p) return nil } func (s structPLS) Save() ([]Property, error) { var props []Property if err := s.save(&props, "", saveOpts{}); err != nil { return nil, err } return props, nil } func (s structPLS) save(props *[]Property, prefix string, opts saveOpts) error { for name, f := range s.codec.fields { name = prefix + name v := s.v.FieldByIndex(f.path) if !v.IsValid() || !v.CanSet() { continue } var opts1 saveOpts opts1.noIndex = opts.noIndex || f.noIndex opts1.multiple = opts.multiple opts1.omitEmpty = f.omitEmpty // don't propagate // For slice fields that aren't []byte, save each element. if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { opts1.multiple = true for j := 0; j < v.Len(); j++ { if err := saveStructProperty(props, name, opts1, v.Index(j)); err != nil { return err } } continue } // Otherwise, save the field itself. if err := saveStructProperty(props, name, opts1, v); err != nil { return err } } return nil } func propertiesToProto(defaultAppID string, key *Key, props []Property) (*pb.EntityProto, error) { e := &pb.EntityProto{ Key: keyToProto(defaultAppID, key), } if key.parent == nil { e.EntityGroup = &pb.Path{} } else { e.EntityGroup = keyToProto(defaultAppID, key.root()).Path } prevMultiple := make(map[string]bool) for _, p := range props { if pm, ok := prevMultiple[p.Name]; ok { if !pm || !p.Multiple { return nil, fmt.Errorf("datastore: multiple Properties with Name %q, but Multiple is false", p.Name) } } else { prevMultiple[p.Name] = p.Multiple } x := &pb.Property{ Name: proto.String(p.Name), Value: new(pb.PropertyValue), Multiple: proto.Bool(p.Multiple), } switch v := p.Value.(type) { case int64: x.Value.Int64Value = proto.Int64(v) case bool: x.Value.BooleanValue = proto.Bool(v) case string: x.Value.StringValue = proto.String(v) if p.NoIndex { x.Meaning = pb.Property_TEXT.Enum() } case float64: x.Value.DoubleValue = proto.Float64(v) case *Key: if v != nil { x.Value.Referencevalue = keyToReferenceValue(defaultAppID, v) } case time.Time: if v.Before(minTime) || v.After(maxTime) { return nil, fmt.Errorf("datastore: time value out of range") } x.Value.Int64Value = proto.Int64(toUnixMicro(v)) x.Meaning = pb.Property_GD_WHEN.Enum() case appengine.BlobKey: x.Value.StringValue = proto.String(string(v)) x.Meaning = pb.Property_BLOBKEY.Enum() case appengine.GeoPoint: if !v.Valid() { return nil, fmt.Errorf("datastore: invalid GeoPoint value") } // NOTE: Strangely, latitude maps to X, longitude to Y. x.Value.Pointvalue = &pb.PropertyValue_PointValue{X: &v.Lat, Y: &v.Lng} x.Meaning = pb.Property_GEORSS_POINT.Enum() case []byte: x.Value.StringValue = proto.String(string(v)) x.Meaning = pb.Property_BLOB.Enum() if !p.NoIndex { return nil, fmt.Errorf("datastore: cannot index a []byte valued Property with Name %q", p.Name) } case ByteString: x.Value.StringValue = proto.String(string(v)) x.Meaning = pb.Property_BYTESTRING.Enum() default: if p.Value != nil { return nil, fmt.Errorf("datastore: invalid Value type for a Property with Name %q", p.Name) } } if p.NoIndex { e.RawProperty = append(e.RawProperty, x) } else { e.Property = append(e.Property, x) if len(e.Property) > maxIndexedProperties { return nil, errors.New("datastore: too many indexed properties") } } } return e, nil } // isEmptyValue is taken from the encoding/json package in the standard library. func isEmptyValue(v reflect.Value) bool { switch v.Kind() { case reflect.Array, reflect.Map, reflect.Slice, reflect.String: // TODO(performance): Only reflect.String needed, other property types are not supported (copy/paste from json package) return v.Len() == 0 case reflect.Bool: return !v.Bool() case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return v.Int() == 0 case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: // TODO(performance): Uint* are unsupported property types - should be removed (copy/paste from json package) return v.Uint() == 0 case reflect.Float32, reflect.Float64: return v.Float() == 0 case reflect.Interface, reflect.Ptr: return v.IsNil() case reflect.Struct: switch x := v.Interface().(type) { case time.Time: return x.IsZero() } } return false }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/query.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 datastore import ( "context" "encoding/base64" "errors" "fmt" "math" "reflect" "strings" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/datastore" ) type operator int const ( lessThan operator = iota lessEq equal greaterEq greaterThan ) var operatorToProto = map[operator]*pb.Query_Filter_Operator{ lessThan: pb.Query_Filter_LESS_THAN.Enum(), lessEq: pb.Query_Filter_LESS_THAN_OR_EQUAL.Enum(), equal: pb.Query_Filter_EQUAL.Enum(), greaterEq: pb.Query_Filter_GREATER_THAN_OR_EQUAL.Enum(), greaterThan: pb.Query_Filter_GREATER_THAN.Enum(), } // filter is a conditional filter on query results. type filter struct { FieldName string Op operator Value interface{} } type sortDirection int const ( ascending sortDirection = iota descending ) var sortDirectionToProto = map[sortDirection]*pb.Query_Order_Direction{ ascending: pb.Query_Order_ASCENDING.Enum(), descending: pb.Query_Order_DESCENDING.Enum(), } // order is a sort order on query results. type order struct { FieldName string Direction sortDirection } // NewQuery creates a new Query for a specific entity kind. // // An empty kind means to return all entities, including entities created and // managed by other App Engine features, and is called a kindless query. // Kindless queries cannot include filters or sort orders on property values. func NewQuery(kind string) *Query { return &Query{ kind: kind, limit: -1, } } // Query represents a datastore query. type Query struct { kind string ancestor *Key filter []filter order []order projection []string distinct bool distinctOn []string keysOnly bool eventual bool limit int32 offset int32 count int32 start *pb.CompiledCursor end *pb.CompiledCursor err error } func (q *Query) clone() *Query { x := *q // Copy the contents of the slice-typed fields to a new backing store. if len(q.filter) > 0 { x.filter = make([]filter, len(q.filter)) copy(x.filter, q.filter) } if len(q.order) > 0 { x.order = make([]order, len(q.order)) copy(x.order, q.order) } return &x } // Ancestor returns a derivative query with an ancestor filter. // The ancestor should not be nil. func (q *Query) Ancestor(ancestor *Key) *Query { q = q.clone() if ancestor == nil { q.err = errors.New("datastore: nil query ancestor") return q } q.ancestor = ancestor return q } // EventualConsistency returns a derivative query that returns eventually // consistent results. // It only has an effect on ancestor queries. func (q *Query) EventualConsistency() *Query { q = q.clone() q.eventual = true return q } // Filter returns a derivative query with a field-based filter. // The filterStr argument must be a field name followed by optional space, // followed by an operator, one of ">", "<", ">=", "<=", or "=". // Fields are compared against the provided value using the operator. // Multiple filters are AND'ed together. func (q *Query) Filter(filterStr string, value interface{}) *Query { q = q.clone() filterStr = strings.TrimSpace(filterStr) if len(filterStr) < 1 { q.err = errors.New("datastore: invalid filter: " + filterStr) return q } f := filter{ FieldName: strings.TrimRight(filterStr, " ><=!"), Value: value, } switch op := strings.TrimSpace(filterStr[len(f.FieldName):]); op { case "<=": f.Op = lessEq case ">=": f.Op = greaterEq case "<": f.Op = lessThan case ">": f.Op = greaterThan case "=": f.Op = equal default: q.err = fmt.Errorf("datastore: invalid operator %q in filter %q", op, filterStr) return q } q.filter = append(q.filter, f) return q } // Order returns a derivative query with a field-based sort order. Orders are // applied in the order they are added. The default order is ascending; to sort // in descending order prefix the fieldName with a minus sign (-). func (q *Query) Order(fieldName string) *Query { q = q.clone() fieldName = strings.TrimSpace(fieldName) o := order{ Direction: ascending, FieldName: fieldName, } if strings.HasPrefix(fieldName, "-") { o.Direction = descending o.FieldName = strings.TrimSpace(fieldName[1:]) } else if strings.HasPrefix(fieldName, "+") { q.err = fmt.Errorf("datastore: invalid order: %q", fieldName) return q } if len(o.FieldName) == 0 { q.err = errors.New("datastore: empty order") return q } q.order = append(q.order, o) return q } // Project returns a derivative query that yields only the given fields. It // cannot be used with KeysOnly. func (q *Query) Project(fieldNames ...string) *Query { q = q.clone() q.projection = append([]string(nil), fieldNames...) return q } // Distinct returns a derivative query that yields de-duplicated entities with // respect to the set of projected fields. It is only used for projection // queries. Distinct cannot be used with DistinctOn. func (q *Query) Distinct() *Query { q = q.clone() q.distinct = true return q } // DistinctOn returns a derivative query that yields de-duplicated entities with // respect to the set of the specified fields. It is only used for projection // queries. The field list should be a subset of the projected field list. // DistinctOn cannot be used with Distinct. func (q *Query) DistinctOn(fieldNames ...string) *Query { q = q.clone() q.distinctOn = fieldNames return q } // KeysOnly returns a derivative query that yields only keys, not keys and // entities. It cannot be used with projection queries. func (q *Query) KeysOnly() *Query { q = q.clone() q.keysOnly = true return q } // Limit returns a derivative query that has a limit on the number of results // returned. A negative value means unlimited. func (q *Query) Limit(limit int) *Query { q = q.clone() if limit < math.MinInt32 || limit > math.MaxInt32 { q.err = errors.New("datastore: query limit overflow") return q } q.limit = int32(limit) return q } // Offset returns a derivative query that has an offset of how many keys to // skip over before returning results. A negative value is invalid. func (q *Query) Offset(offset int) *Query { q = q.clone() if offset < 0 { q.err = errors.New("datastore: negative query offset") return q } if offset > math.MaxInt32 { q.err = errors.New("datastore: query offset overflow") return q } q.offset = int32(offset) return q } // BatchSize returns a derivative query to fetch the supplied number of results // at once. This value should be greater than zero, and equal to or less than // the Limit. func (q *Query) BatchSize(size int) *Query { q = q.clone() if size <= 0 || size > math.MaxInt32 { q.err = errors.New("datastore: query batch size overflow") return q } q.count = int32(size) return q } // Start returns a derivative query with the given start point. func (q *Query) Start(c Cursor) *Query { q = q.clone() if c.cc == nil { q.err = errors.New("datastore: invalid cursor") return q } q.start = c.cc return q } // End returns a derivative query with the given end point. func (q *Query) End(c Cursor) *Query { q = q.clone() if c.cc == nil { q.err = errors.New("datastore: invalid cursor") return q } q.end = c.cc return q } // toProto converts the query to a protocol buffer. func (q *Query) toProto(dst *pb.Query, appID string) error { if len(q.projection) != 0 && q.keysOnly { return errors.New("datastore: query cannot both project and be keys-only") } if len(q.distinctOn) != 0 && q.distinct { return errors.New("datastore: query cannot be both distinct and distinct-on") } dst.Reset() dst.App = proto.String(appID) if q.kind != "" { dst.Kind = proto.String(q.kind) } if q.ancestor != nil { dst.Ancestor = keyToProto(appID, q.ancestor) if q.eventual { dst.Strong = proto.Bool(false) } } if q.projection != nil { dst.PropertyName = q.projection if len(q.distinctOn) != 0 { dst.GroupByPropertyName = q.distinctOn } if q.distinct { dst.GroupByPropertyName = q.projection } } if q.keysOnly { dst.KeysOnly = proto.Bool(true) dst.RequirePerfectPlan = proto.Bool(true) } for _, qf := range q.filter { if qf.FieldName == "" { return errors.New("datastore: empty query filter field name") } p, errStr := valueToProto(appID, qf.FieldName, reflect.ValueOf(qf.Value), false) if errStr != "" { return errors.New("datastore: bad query filter value type: " + errStr) } xf := &pb.Query_Filter{ Op: operatorToProto[qf.Op], Property: []*pb.Property{p}, } if xf.Op == nil { return errors.New("datastore: unknown query filter operator") } dst.Filter = append(dst.Filter, xf) } for _, qo := range q.order { if qo.FieldName == "" { return errors.New("datastore: empty query order field name") } xo := &pb.Query_Order{ Property: proto.String(qo.FieldName), Direction: sortDirectionToProto[qo.Direction], } if xo.Direction == nil { return errors.New("datastore: unknown query order direction") } dst.Order = append(dst.Order, xo) } if q.limit >= 0 { dst.Limit = proto.Int32(q.limit) } if q.offset != 0 { dst.Offset = proto.Int32(q.offset) } if q.count != 0 { dst.Count = proto.Int32(q.count) } dst.CompiledCursor = q.start dst.EndCompiledCursor = q.end dst.Compile = proto.Bool(true) return nil } // Count returns the number of results for the query. // // The running time and number of API calls made by Count scale linearly with // the sum of the query's offset and limit. Unless the result count is // expected to be small, it is best to specify a limit; otherwise Count will // continue until it finishes counting or the provided context expires. func (q *Query) Count(c context.Context) (int, error) { // Check that the query is well-formed. if q.err != nil { return 0, q.err } // Run a copy of the query, with keysOnly true (if we're not a projection, // since the two are incompatible), and an adjusted offset. We also set the // limit to zero, as we don't want any actual entity data, just the number // of skipped results. newQ := q.clone() newQ.keysOnly = len(newQ.projection) == 0 newQ.limit = 0 if q.limit < 0 { // If the original query was unlimited, set the new query's offset to maximum. newQ.offset = math.MaxInt32 } else { newQ.offset = q.offset + q.limit if newQ.offset < 0 { // Do the best we can, in the presence of overflow. newQ.offset = math.MaxInt32 } } req := &pb.Query{} if err := newQ.toProto(req, internal.FullyQualifiedAppID(c)); err != nil { return 0, err } res := &pb.QueryResult{} if err := internal.Call(c, "datastore_v3", "RunQuery", req, res); err != nil { return 0, err } // n is the count we will return. For example, suppose that our original // query had an offset of 4 and a limit of 2008: the count will be 2008, // provided that there are at least 2012 matching entities. However, the // RPCs will only skip 1000 results at a time. The RPC sequence is: // call RunQuery with (offset, limit) = (2012, 0) // 2012 == newQ.offset // response has (skippedResults, moreResults) = (1000, true) // n += 1000 // n == 1000 // call Next with (offset, limit) = (1012, 0) // 1012 == newQ.offset - n // response has (skippedResults, moreResults) = (1000, true) // n += 1000 // n == 2000 // call Next with (offset, limit) = (12, 0) // 12 == newQ.offset - n // response has (skippedResults, moreResults) = (12, false) // n += 12 // n == 2012 // // exit the loop // n -= 4 // n == 2008 var n int32 for { // The QueryResult should have no actual entity data, just skipped results. if len(res.Result) != 0 { return 0, errors.New("datastore: internal error: Count request returned too much data") } n += res.GetSkippedResults() if !res.GetMoreResults() { break } if err := callNext(c, res, newQ.offset-n, q.count); err != nil { return 0, err } } n -= q.offset if n < 0 { // If the offset was greater than the number of matching entities, // return 0 instead of negative. n = 0 } return int(n), nil } // callNext issues a datastore_v3/Next RPC to advance a cursor, such as that // returned by a query with more results. func callNext(c context.Context, res *pb.QueryResult, offset, count int32) error { if res.Cursor == nil { return errors.New("datastore: internal error: server did not return a cursor") } req := &pb.NextRequest{ Cursor: res.Cursor, } if count >= 0 { req.Count = proto.Int32(count) } if offset != 0 { req.Offset = proto.Int32(offset) } if res.CompiledCursor != nil { req.Compile = proto.Bool(true) } res.Reset() return internal.Call(c, "datastore_v3", "Next", req, res) } // GetAll runs the query in the given context and returns all keys that match // that query, as well as appending the values to dst. // // dst must have type *[]S or *[]*S or *[]P, for some struct type S or some non- // interface, non-pointer type P such that P or *P implements PropertyLoadSaver. // // As a special case, *PropertyList is an invalid type for dst, even though a // PropertyList is a slice of structs. It is treated as invalid to avoid being // mistakenly passed when *[]PropertyList was intended. // // The keys returned by GetAll will be in a 1-1 correspondence with the entities // added to dst. // // If q is a “keys-only” query, GetAll ignores dst and only returns the keys. // // The running time and number of API calls made by GetAll scale linearly with // the sum of the query's offset and limit. Unless the result count is // expected to be small, it is best to specify a limit; otherwise GetAll will // continue until it finishes collecting results or the provided context // expires. func (q *Query) GetAll(c context.Context, dst interface{}) ([]*Key, error) { var ( dv reflect.Value mat multiArgType elemType reflect.Type errFieldMismatch error ) if !q.keysOnly { dv = reflect.ValueOf(dst) if dv.Kind() != reflect.Ptr || dv.IsNil() { return nil, ErrInvalidEntityType } dv = dv.Elem() mat, elemType = checkMultiArg(dv) if mat == multiArgTypeInvalid || mat == multiArgTypeInterface { return nil, ErrInvalidEntityType } } var keys []*Key for t := q.Run(c); ; { k, e, err := t.next() if err == Done { break } if err != nil { return keys, err } if !q.keysOnly { ev := reflect.New(elemType) if elemType.Kind() == reflect.Map { // This is a special case. The zero values of a map type are // not immediately useful; they have to be make'd. // // Funcs and channels are similar, in that a zero value is not useful, // but even a freshly make'd channel isn't useful: there's no fixed // channel buffer size that is always going to be large enough, and // there's no goroutine to drain the other end. Theoretically, these // types could be supported, for example by sniffing for a constructor // method or requiring prior registration, but for now it's not a // frequent enough concern to be worth it. Programmers can work around // it by explicitly using Iterator.Next instead of the Query.GetAll // convenience method. x := reflect.MakeMap(elemType) ev.Elem().Set(x) } if err = loadEntity(ev.Interface(), e); err != nil { if _, ok := err.(*ErrFieldMismatch); ok { // We continue loading entities even in the face of field mismatch errors. // If we encounter any other error, that other error is returned. Otherwise, // an ErrFieldMismatch is returned. errFieldMismatch = err } else { return keys, err } } if mat != multiArgTypeStructPtr { ev = ev.Elem() } dv.Set(reflect.Append(dv, ev)) } keys = append(keys, k) } return keys, errFieldMismatch } // Run runs the query in the given context. func (q *Query) Run(c context.Context) *Iterator { if q.err != nil { return &Iterator{err: q.err} } t := &Iterator{ c: c, limit: q.limit, count: q.count, q: q, prevCC: q.start, } var req pb.Query if err := q.toProto(&req, internal.FullyQualifiedAppID(c)); err != nil { t.err = err return t } if err := internal.Call(c, "datastore_v3", "RunQuery", &req, &t.res); err != nil { t.err = err return t } offset := q.offset - t.res.GetSkippedResults() var count int32 if t.count > 0 && (t.limit < 0 || t.count < t.limit) { count = t.count } else { count = t.limit } for offset > 0 && t.res.GetMoreResults() { t.prevCC = t.res.CompiledCursor if err := callNext(t.c, &t.res, offset, count); err != nil { t.err = err break } skip := t.res.GetSkippedResults() if skip < 0 { t.err = errors.New("datastore: internal error: negative number of skipped_results") break } offset -= skip } if offset < 0 { t.err = errors.New("datastore: internal error: query offset was overshot") } return t } // Iterator is the result of running a query. type Iterator struct { c context.Context err error // res is the result of the most recent RunQuery or Next API call. res pb.QueryResult // i is how many elements of res.Result we have iterated over. i int // limit is the limit on the number of results this iterator should return. // A negative value means unlimited. limit int32 // count is the number of results this iterator should fetch at once. This // should be equal to or greater than zero. count int32 // q is the original query which yielded this iterator. q *Query // prevCC is the compiled cursor that marks the end of the previous batch // of results. prevCC *pb.CompiledCursor } // Done is returned when a query iteration has completed. var Done = errors.New("datastore: query has no more results") // Next returns the key of the next result. When there are no more results, // Done is returned as the error. // // If the query is not keys only and dst is non-nil, it also loads the entity // stored for that key into the struct pointer or PropertyLoadSaver dst, with // the same semantics and possible errors as for the Get function. func (t *Iterator) Next(dst interface{}) (*Key, error) { k, e, err := t.next() if err != nil { return nil, err } if dst != nil && !t.q.keysOnly { err = loadEntity(dst, e) } return k, err } func (t *Iterator) next() (*Key, *pb.EntityProto, error) { if t.err != nil { return nil, nil, t.err } // Issue datastore_v3/Next RPCs as necessary. for t.i == len(t.res.Result) { if !t.res.GetMoreResults() { t.err = Done return nil, nil, t.err } t.prevCC = t.res.CompiledCursor var count int32 if t.count > 0 && (t.limit < 0 || t.count < t.limit) { count = t.count } else { count = t.limit } if err := callNext(t.c, &t.res, 0, count); err != nil { t.err = err return nil, nil, t.err } if t.res.GetSkippedResults() != 0 { t.err = errors.New("datastore: internal error: iterator has skipped results") return nil, nil, t.err } t.i = 0 if t.limit >= 0 { t.limit -= int32(len(t.res.Result)) if t.limit < 0 { t.err = errors.New("datastore: internal error: query returned more results than the limit") return nil, nil, t.err } } } // Extract the key from the t.i'th element of t.res.Result. e := t.res.Result[t.i] t.i++ if e.Key == nil { return nil, nil, errors.New("datastore: internal error: server did not return a key") } k, err := protoToKey(e.Key) if err != nil || k.Incomplete() { return nil, nil, errors.New("datastore: internal error: server returned an invalid key") } return k, e, nil } // Cursor returns a cursor for the iterator's current location. func (t *Iterator) Cursor() (Cursor, error) { if t.err != nil && t.err != Done { return Cursor{}, t.err } // If we are at either end of the current batch of results, // return the compiled cursor at that end. skipped := t.res.GetSkippedResults() if t.i == 0 && skipped == 0 { if t.prevCC == nil { // A nil pointer (of type *pb.CompiledCursor) means no constraint: // passing it as the end cursor of a new query means unlimited results // (glossing over the integer limit parameter for now). // A non-nil pointer to an empty pb.CompiledCursor means the start: // passing it as the end cursor of a new query means 0 results. // If prevCC was nil, then the original query had no start cursor, but // Iterator.Cursor should return "the start" instead of unlimited. return Cursor{&zeroCC}, nil } return Cursor{t.prevCC}, nil } if t.i == len(t.res.Result) { return Cursor{t.res.CompiledCursor}, nil } // Otherwise, re-run the query offset to this iterator's position, starting from // the most recent compiled cursor. This is done on a best-effort basis, as it // is racy; if a concurrent process has added or removed entities, then the // cursor returned may be inconsistent. q := t.q.clone() q.start = t.prevCC q.offset = skipped + int32(t.i) q.limit = 0 q.keysOnly = len(q.projection) == 0 t1 := q.Run(t.c) _, _, err := t1.next() if err != Done { if err == nil { err = fmt.Errorf("datastore: internal error: zero-limit query did not have zero results") } return Cursor{}, err } return Cursor{t1.res.CompiledCursor}, nil } var zeroCC pb.CompiledCursor // Cursor is an iterator's position. It can be converted to and from an opaque // string. A cursor can be used from different HTTP requests, but only with a // query with the same kind, ancestor, filter and order constraints. type Cursor struct { cc *pb.CompiledCursor } // String returns a base-64 string representation of a cursor. func (c Cursor) String() string { if c.cc == nil { return "" } b, err := proto.Marshal(c.cc) if err != nil { // The only way to construct a Cursor with a non-nil cc field is to // unmarshal from the byte representation. We panic if the unmarshal // succeeds but the marshaling of the unchanged protobuf value fails. panic(fmt.Sprintf("datastore: internal error: malformed cursor: %v", err)) } return strings.TrimRight(base64.URLEncoding.EncodeToString(b), "=") } // DecodeCursor decodes a cursor from its base-64 string representation. func DecodeCursor(s string) (Cursor, error) { if s == "" { return Cursor{&zeroCC}, nil } if n := len(s) % 4; n != 0 { s += strings.Repeat("=", 4-n) } b, err := base64.URLEncoding.DecodeString(s) if err != nil { return Cursor{}, err } cc := &pb.CompiledCursor{} if err := proto.Unmarshal(b, cc); err != nil { return Cursor{}, err } return Cursor{cc}, nil }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/doc.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 datastore provides a client for App Engine's datastore service. # Basic Operations Entities are the unit of storage and are associated with a key. A key consists of an optional parent key, a string application ID, a string kind (also known as an entity type), and either a StringID or an IntID. A StringID is also known as an entity name or key name. It is valid to create a key with a zero StringID and a zero IntID; this is called an incomplete key, and does not refer to any saved entity. Putting an entity into the datastore under an incomplete key will cause a unique key to be generated for that entity, with a non-zero IntID. An entity's contents are a mapping from case-sensitive field names to values. Valid value types are: - signed integers (int, int8, int16, int32 and int64), - bool, - string, - float32 and float64, - []byte (up to 1 megabyte in length), - any type whose underlying type is one of the above predeclared types, - ByteString, - *Key, - time.Time (stored with microsecond precision), - appengine.BlobKey, - appengine.GeoPoint, - structs whose fields are all valid value types, - slices of any of the above. Slices of structs are valid, as are structs that contain slices. However, if one struct contains another, then at most one of those can be repeated. This disqualifies recursively defined struct types: any struct T that (directly or indirectly) contains a []T. The Get and Put functions load and save an entity's contents. An entity's contents are typically represented by a struct pointer. Example code: type Entity struct { Value string } func handle(w http.ResponseWriter, r *http.Request) { ctx := appengine.NewContext(r) k := datastore.NewKey(ctx, "Entity", "stringID", 0, nil) e := new(Entity) if err := datastore.Get(ctx, k, e); err != nil { http.Error(w, err.Error(), 500) return } old := e.Value e.Value = r.URL.Path if _, err := datastore.Put(ctx, k, e); err != nil { http.Error(w, err.Error(), 500) return } w.Header().Set("Content-Type", "text/plain; charset=utf-8") fmt.Fprintf(w, "old=%q\nnew=%q\n", old, e.Value) } GetMulti, PutMulti and DeleteMulti are batch versions of the Get, Put and Delete functions. They take a []*Key instead of a *Key, and may return an appengine.MultiError when encountering partial failure. # Properties An entity's contents can be represented by a variety of types. These are typically struct pointers, but can also be any type that implements the PropertyLoadSaver interface. If using a struct pointer, you do not have to explicitly implement the PropertyLoadSaver interface; the datastore will automatically convert via reflection. If a struct pointer does implement that interface then those methods will be used in preference to the default behavior for struct pointers. Struct pointers are more strongly typed and are easier to use; PropertyLoadSavers are more flexible. The actual types passed do not have to match between Get and Put calls or even across different calls to datastore. It is valid to put a *PropertyList and get that same entity as a *myStruct, or put a *myStruct0 and get a *myStruct1. Conceptually, any entity is saved as a sequence of properties, and is loaded into the destination value on a property-by-property basis. When loading into a struct pointer, an entity that cannot be completely represented (such as a missing field) will result in an ErrFieldMismatch error but it is up to the caller whether this error is fatal, recoverable or ignorable. By default, for struct pointers, all properties are potentially indexed, and the property name is the same as the field name (and hence must start with an upper case letter). Fields may have a `datastore:"name,options"` tag. The tag name is the property name, which must be one or more valid Go identifiers joined by ".", but may start with a lower case letter. An empty tag name means to just use the field name. A "-" tag name means that the datastore will ignore that field. The only valid options are "omitempty" and "noindex". If the options include "omitempty" and the value of the field is empty, then the field will be omitted on Save. The empty values are false, 0, any nil interface value, and any array, slice, map, or string of length zero. Struct field values will never be empty. If options include "noindex" then the field will not be indexed. All fields are indexed by default. Strings or byte slices longer than 1500 bytes cannot be indexed; fields used to store long strings and byte slices must be tagged with "noindex" or they will cause Put operations to fail. To use multiple options together, separate them by a comma. The order does not matter. If the options is "" then the comma may be omitted. Example code: // A and B are renamed to a and b. // A, C and J are not indexed. // D's tag is equivalent to having no tag at all (E). // I is ignored entirely by the datastore. // J has tag information for both the datastore and json packages. type TaggedStruct struct { A int `datastore:"a,noindex"` B int `datastore:"b"` C int `datastore:",noindex"` D int `datastore:""` E int I int `datastore:"-"` J int `datastore:",noindex" json:"j"` } # Structured Properties If the struct pointed to contains other structs, then the nested or embedded structs are flattened. For example, given these definitions: type Inner1 struct { W int32 X string } type Inner2 struct { Y float64 } type Inner3 struct { Z bool } type Outer struct { A int16 I []Inner1 J Inner2 Inner3 } then an Outer's properties would be equivalent to those of: type OuterEquivalent struct { A int16 IDotW []int32 `datastore:"I.W"` IDotX []string `datastore:"I.X"` JDotY float64 `datastore:"J.Y"` Z bool } If Outer's embedded Inner3 field was tagged as `datastore:"Foo"` then the equivalent field would instead be: FooDotZ bool `datastore:"Foo.Z"`. If an outer struct is tagged "noindex" then all of its implicit flattened fields are effectively "noindex". # The PropertyLoadSaver Interface An entity's contents can also be represented by any type that implements the PropertyLoadSaver interface. This type may be a struct pointer, but it does not have to be. The datastore package will call Load when getting the entity's contents, and Save when putting the entity's contents. Possible uses include deriving non-stored fields, verifying fields, or indexing a field only if its value is positive. Example code: type CustomPropsExample struct { I, J int // Sum is not stored, but should always be equal to I + J. Sum int `datastore:"-"` } func (x *CustomPropsExample) Load(ps []datastore.Property) error { // Load I and J as usual. if err := datastore.LoadStruct(x, ps); err != nil { return err } // Derive the Sum field. x.Sum = x.I + x.J return nil } func (x *CustomPropsExample) Save() ([]datastore.Property, error) { // Validate the Sum field. if x.Sum != x.I + x.J { return nil, errors.New("CustomPropsExample has inconsistent sum") } // Save I and J as usual. The code below is equivalent to calling // "return datastore.SaveStruct(x)", but is done manually for // demonstration purposes. return []datastore.Property{ { Name: "I", Value: int64(x.I), }, { Name: "J", Value: int64(x.J), }, }, nil } The *PropertyList type implements PropertyLoadSaver, and can therefore hold an arbitrary entity's contents. # Queries Queries retrieve entities based on their properties or key's ancestry. Running a query yields an iterator of results: either keys or (key, entity) pairs. Queries are re-usable and it is safe to call Query.Run from concurrent goroutines. Iterators are not safe for concurrent use. Queries are immutable, and are either created by calling NewQuery, or derived from an existing query by calling a method like Filter or Order that returns a new query value. A query is typically constructed by calling NewQuery followed by a chain of zero or more such methods. These methods are: - Ancestor and Filter constrain the entities returned by running a query. - Order affects the order in which they are returned. - Project constrains the fields returned. - Distinct de-duplicates projected entities. - KeysOnly makes the iterator return only keys, not (key, entity) pairs. - Start, End, Offset and Limit define which sub-sequence of matching entities to return. Start and End take cursors, Offset and Limit take integers. Start and Offset affect the first result, End and Limit affect the last result. If both Start and Offset are set, then the offset is relative to Start. If both End and Limit are set, then the earliest constraint wins. Limit is relative to Start+Offset, not relative to End. As a special case, a negative limit means unlimited. Example code: type Widget struct { Description string Price int } func handle(w http.ResponseWriter, r *http.Request) { ctx := appengine.NewContext(r) q := datastore.NewQuery("Widget"). Filter("Price <", 1000). Order("-Price") b := new(bytes.Buffer) for t := q.Run(ctx); ; { var x Widget key, err := t.Next(&x) if err == datastore.Done { break } if err != nil { serveError(ctx, w, err) return } fmt.Fprintf(b, "Key=%v\nWidget=%#v\n\n", key, x) } w.Header().Set("Content-Type", "text/plain; charset=utf-8") io.Copy(w, b) } # Transactions RunInTransaction runs a function in a transaction. Example code: type Counter struct { Count int } func inc(ctx context.Context, key *datastore.Key) (int, error) { var x Counter if err := datastore.Get(ctx, key, &x); err != nil && err != datastore.ErrNoSuchEntity { return 0, err } x.Count++ if _, err := datastore.Put(ctx, key, &x); err != nil { return 0, err } return x.Count, nil } func handle(w http.ResponseWriter, r *http.Request) { ctx := appengine.NewContext(r) var count int err := datastore.RunInTransaction(ctx, func(ctx context.Context) error { var err1 error count, err1 = inc(ctx, datastore.NewKey(ctx, "Counter", "singleton", 0, nil)) return err1 }, nil) if err != nil { serveError(ctx, w, err) return } w.Header().Set("Content-Type", "text/plain; charset=utf-8") fmt.Fprintf(w, "Count=%d", count) } # Metadata The datastore package provides access to some of App Engine's datastore metadata. This metadata includes information about the entity groups, namespaces, entity kinds, and properties in the datastore, as well as the property representations for each property. Example code: func handle(w http.ResponseWriter, r *http.Request) { // Print all the kinds in the datastore, with all the indexed // properties (and their representations) for each. ctx := appengine.NewContext(r) kinds, err := datastore.Kinds(ctx) if err != nil { serveError(ctx, w, err) return } w.Header().Set("Content-Type", "text/plain; charset=utf-8") for _, kind := range kinds { fmt.Fprintf(w, "%s:\n", kind) props, err := datastore.KindProperties(ctx, kind) if err != nil { fmt.Fprintln(w, "\t(unable to retrieve properties)") continue } for p, rep := range props { fmt.Fprintf(w, "\t-%s (%s)\n", p, strings.Join(rep, ", ")) } } } */ package datastore // import "google.golang.org/appengine/v2/datastore"
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/keycompat.go
// Copyright 2019 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 datastore import ( "context" "sync" "google.golang.org/appengine/v2/datastore/internal/cloudkey" "google.golang.org/appengine/v2/internal" ) var keyConversion struct { mu sync.RWMutex appID string // read using getKeyConversionAppID } // EnableKeyConversion enables encoded key compatibility with the Cloud // Datastore client library (cloud.google.com/go/datastore). Encoded keys // generated by the Cloud Datastore client library will be decoded into App // Engine datastore keys. // // The context provided must be an App Engine context if running in App Engine // first generation runtime. This can be called in the /_ah/start handler. It is // safe to call multiple times, and is cheap to call, so can also be inserted as // middleware. // // Enabling key compatibility does not affect the encoding format used by // Key.Encode, it only expands the type of keys that are able to be decoded with // DecodeKey. func EnableKeyConversion(ctx context.Context) { // Only attempt to set appID if it's unset. // If already set, ignore. if getKeyConversionAppID() != "" { return } keyConversion.mu.Lock() // Check again to avoid race where another goroutine set appID between the call // to getKeyConversionAppID above and taking the write lock. if keyConversion.appID == "" { keyConversion.appID = internal.FullyQualifiedAppID(ctx) } keyConversion.mu.Unlock() } func getKeyConversionAppID() string { keyConversion.mu.RLock() appID := keyConversion.appID keyConversion.mu.RUnlock() return appID } // decodeCloudKey attempts to decode the given encoded key generated by the // Cloud Datastore client library (cloud.google.com/go/datastore), returning nil // if the key couldn't be decoded. func decodeCloudKey(encoded string) *Key { appID := getKeyConversionAppID() if appID == "" { return nil } k, err := cloudkey.DecodeKey(encoded) if err != nil { return nil } return convertCloudKey(k, appID) } // convertCloudKey converts a Cloud Datastore key and converts it to an App // Engine Datastore key. Cloud Datastore keys don't include the project/app ID, // so we must add it back in. func convertCloudKey(key *cloudkey.Key, appID string) *Key { if key == nil { return nil } k := &Key{ intID: key.ID, kind: key.Kind, namespace: key.Namespace, parent: convertCloudKey(key.Parent, appID), stringID: key.Name, appID: appID, } return k }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/datastore.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 datastore import ( "context" "errors" "fmt" "reflect" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/datastore" ) var ( // ErrInvalidEntityType is returned when functions like Get or Next are // passed a dst or src argument of invalid type. ErrInvalidEntityType = errors.New("datastore: invalid entity type") // ErrInvalidKey is returned when an invalid key is presented. ErrInvalidKey = errors.New("datastore: invalid key") // ErrNoSuchEntity is returned when no entity was found for a given key. ErrNoSuchEntity = errors.New("datastore: no such entity") ) // ErrFieldMismatch is returned when a field is to be loaded into a different // type than the one it was stored from, or when a field is missing or // unexported in the destination struct. // StructType is the type of the struct pointed to by the destination argument // passed to Get or to Iterator.Next. type ErrFieldMismatch struct { StructType reflect.Type FieldName string Reason string } func (e *ErrFieldMismatch) Error() string { return fmt.Sprintf("datastore: cannot load field %q into a %q: %s", e.FieldName, e.StructType, e.Reason) } // protoToKey converts a Reference proto to a *Key. If the key is invalid, // protoToKey will return the invalid key along with ErrInvalidKey. func protoToKey(r *pb.Reference) (k *Key, err error) { appID := r.GetApp() namespace := r.GetNameSpace() for _, e := range r.Path.Element { k = &Key{ kind: e.GetType(), stringID: e.GetName(), intID: e.GetId(), parent: k, appID: appID, namespace: namespace, } if !k.valid() { return k, ErrInvalidKey } } return } // keyToProto converts a *Key to a Reference proto. func keyToProto(defaultAppID string, k *Key) *pb.Reference { appID := k.appID if appID == "" { appID = defaultAppID } n := 0 for i := k; i != nil; i = i.parent { n++ } e := make([]*pb.Path_Element, n) for i := k; i != nil; i = i.parent { n-- e[n] = &pb.Path_Element{ Type: &i.kind, } // At most one of {Name,Id} should be set. // Neither will be set for incomplete keys. if i.stringID != "" { e[n].Name = &i.stringID } else if i.intID != 0 { e[n].Id = &i.intID } } var namespace *string if k.namespace != "" { namespace = proto.String(k.namespace) } return &pb.Reference{ App: proto.String(appID), NameSpace: namespace, Path: &pb.Path{ Element: e, }, } } // multiKeyToProto is a batch version of keyToProto. func multiKeyToProto(appID string, key []*Key) []*pb.Reference { ret := make([]*pb.Reference, len(key)) for i, k := range key { ret[i] = keyToProto(appID, k) } return ret } // multiValid is a batch version of Key.valid. It returns an error, not a // []bool. func multiValid(key []*Key) error { invalid := false for _, k := range key { if !k.valid() { invalid = true break } } if !invalid { return nil } err := make(appengine.MultiError, len(key)) for i, k := range key { if !k.valid() { err[i] = ErrInvalidKey } } return err } // It's unfortunate that the two semantically equivalent concepts pb.Reference // and pb.PropertyValue_ReferenceValue aren't the same type. For example, the // two have different protobuf field numbers. // referenceValueToKey is the same as protoToKey except the input is a // PropertyValue_ReferenceValue instead of a Reference. func referenceValueToKey(r *pb.PropertyValue_ReferenceValue) (k *Key, err error) { appID := r.GetApp() namespace := r.GetNameSpace() for _, e := range r.Pathelement { k = &Key{ kind: e.GetType(), stringID: e.GetName(), intID: e.GetId(), parent: k, appID: appID, namespace: namespace, } if !k.valid() { return nil, ErrInvalidKey } } return } // keyToReferenceValue is the same as keyToProto except the output is a // PropertyValue_ReferenceValue instead of a Reference. func keyToReferenceValue(defaultAppID string, k *Key) *pb.PropertyValue_ReferenceValue { ref := keyToProto(defaultAppID, k) pe := make([]*pb.PropertyValue_ReferenceValue_PathElement, len(ref.Path.Element)) for i, e := range ref.Path.Element { pe[i] = &pb.PropertyValue_ReferenceValue_PathElement{ Type: e.Type, Id: e.Id, Name: e.Name, } } return &pb.PropertyValue_ReferenceValue{ App: ref.App, NameSpace: ref.NameSpace, Pathelement: pe, } } type multiArgType int const ( multiArgTypeInvalid multiArgType = iota multiArgTypePropertyLoadSaver multiArgTypeStruct multiArgTypeStructPtr multiArgTypeInterface ) // checkMultiArg checks that v has type []S, []*S, []I, or []P, for some struct // type S, for some interface type I, or some non-interface non-pointer type P // such that P or *P implements PropertyLoadSaver. // // It returns what category the slice's elements are, and the reflect.Type // that represents S, I or P. // // As a special case, PropertyList is an invalid type for v. func checkMultiArg(v reflect.Value) (m multiArgType, elemType reflect.Type) { if v.Kind() != reflect.Slice { return multiArgTypeInvalid, nil } if v.Type() == typeOfPropertyList { return multiArgTypeInvalid, nil } elemType = v.Type().Elem() if reflect.PtrTo(elemType).Implements(typeOfPropertyLoadSaver) { return multiArgTypePropertyLoadSaver, elemType } switch elemType.Kind() { case reflect.Struct: return multiArgTypeStruct, elemType case reflect.Interface: return multiArgTypeInterface, elemType case reflect.Ptr: elemType = elemType.Elem() if elemType.Kind() == reflect.Struct { return multiArgTypeStructPtr, elemType } } return multiArgTypeInvalid, nil } // Get loads the entity stored for k into dst, which must be a struct pointer // or implement PropertyLoadSaver. If there is no such entity for the key, Get // returns ErrNoSuchEntity. // // The values of dst's unmatched struct fields are not modified, and matching // slice-typed fields are not reset before appending to them. In particular, it // is recommended to pass a pointer to a zero valued struct on each Get call. // // ErrFieldMismatch is returned when a field is to be loaded into a different // type than the one it was stored from, or when a field is missing or // unexported in the destination struct. ErrFieldMismatch is only returned if // dst is a struct pointer. func Get(c context.Context, key *Key, dst interface{}) error { if dst == nil { // GetMulti catches nil interface; we need to catch nil ptr here return ErrInvalidEntityType } err := GetMulti(c, []*Key{key}, []interface{}{dst}) if me, ok := err.(appengine.MultiError); ok { return me[0] } return err } // GetMulti is a batch version of Get. // // dst must be a []S, []*S, []I or []P, for some struct type S, some interface // type I, or some non-interface non-pointer type P such that P or *P // implements PropertyLoadSaver. If an []I, each element must be a valid dst // for Get: it must be a struct pointer or implement PropertyLoadSaver. // // As a special case, PropertyList is an invalid type for dst, even though a // PropertyList is a slice of structs. It is treated as invalid to avoid being // mistakenly passed when []PropertyList was intended. func GetMulti(c context.Context, key []*Key, dst interface{}) error { v := reflect.ValueOf(dst) multiArgType, _ := checkMultiArg(v) if multiArgType == multiArgTypeInvalid { return errors.New("datastore: dst has invalid type") } if len(key) != v.Len() { return errors.New("datastore: key and dst slices have different length") } if len(key) == 0 { return nil } if err := multiValid(key); err != nil { return err } req := &pb.GetRequest{ Key: multiKeyToProto(internal.FullyQualifiedAppID(c), key), } res := &pb.GetResponse{} if err := internal.Call(c, "datastore_v3", "Get", req, res); err != nil { return err } if len(key) != len(res.Entity) { return errors.New("datastore: internal error: server returned the wrong number of entities") } multiErr, any := make(appengine.MultiError, len(key)), false for i, e := range res.Entity { if e.Entity == nil { multiErr[i] = ErrNoSuchEntity } else { elem := v.Index(i) if multiArgType == multiArgTypePropertyLoadSaver || multiArgType == multiArgTypeStruct { elem = elem.Addr() } if multiArgType == multiArgTypeStructPtr && elem.IsNil() { elem.Set(reflect.New(elem.Type().Elem())) } multiErr[i] = loadEntity(elem.Interface(), e.Entity) } if multiErr[i] != nil { any = true } } if any { return multiErr } return nil } // Put saves the entity src into the datastore with key k. src must be a struct // pointer or implement PropertyLoadSaver; if a struct pointer then any // unexported fields of that struct will be skipped. If k is an incomplete key, // the returned key will be a unique key generated by the datastore. func Put(c context.Context, key *Key, src interface{}) (*Key, error) { k, err := PutMulti(c, []*Key{key}, []interface{}{src}) if err != nil { if me, ok := err.(appengine.MultiError); ok { return nil, me[0] } return nil, err } return k[0], nil } // PutMulti is a batch version of Put. // // src must satisfy the same conditions as the dst argument to GetMulti. func PutMulti(c context.Context, key []*Key, src interface{}) ([]*Key, error) { v := reflect.ValueOf(src) multiArgType, _ := checkMultiArg(v) if multiArgType == multiArgTypeInvalid { return nil, errors.New("datastore: src has invalid type") } if len(key) != v.Len() { return nil, errors.New("datastore: key and src slices have different length") } if len(key) == 0 { return nil, nil } appID := internal.FullyQualifiedAppID(c) if err := multiValid(key); err != nil { return nil, err } req := &pb.PutRequest{} for i := range key { elem := v.Index(i) if multiArgType == multiArgTypePropertyLoadSaver || multiArgType == multiArgTypeStruct { elem = elem.Addr() } sProto, err := saveEntity(appID, key[i], elem.Interface()) if err != nil { return nil, err } req.Entity = append(req.Entity, sProto) } res := &pb.PutResponse{} if err := internal.Call(c, "datastore_v3", "Put", req, res); err != nil { return nil, err } if len(key) != len(res.Key) { return nil, errors.New("datastore: internal error: server returned the wrong number of keys") } ret := make([]*Key, len(key)) for i := range ret { var err error ret[i], err = protoToKey(res.Key[i]) if err != nil || ret[i].Incomplete() { return nil, errors.New("datastore: internal error: server returned an invalid key") } } return ret, nil } // Delete deletes the entity for the given key. func Delete(c context.Context, key *Key) error { err := DeleteMulti(c, []*Key{key}) if me, ok := err.(appengine.MultiError); ok { return me[0] } return err } // DeleteMulti is a batch version of Delete. func DeleteMulti(c context.Context, key []*Key) error { if len(key) == 0 { return nil } if err := multiValid(key); err != nil { return err } req := &pb.DeleteRequest{ Key: multiKeyToProto(internal.FullyQualifiedAppID(c), key), } res := &pb.DeleteResponse{} return internal.Call(c, "datastore_v3", "Delete", req, res) } func namespaceMod(m proto.Message, namespace string) { // pb.Query is the only type that has a name_space field. // All other namespace support in datastore is in the keys. switch m := m.(type) { case *pb.Query: if m.NameSpace == nil { m.NameSpace = &namespace } } } func init() { internal.NamespaceMods["datastore_v3"] = namespaceMod internal.RegisterErrorCodeMap("datastore_v3", pb.Error_ErrorCode_name) internal.RegisterTimeoutErrorCode("datastore_v3", int32(pb.Error_TIMEOUT)) }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/transaction.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 datastore import ( "context" "errors" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/datastore" ) func init() { internal.RegisterTransactionSetter(func(x *pb.Query, t *pb.Transaction) { x.Transaction = t }) internal.RegisterTransactionSetter(func(x *pb.GetRequest, t *pb.Transaction) { x.Transaction = t }) internal.RegisterTransactionSetter(func(x *pb.PutRequest, t *pb.Transaction) { x.Transaction = t }) internal.RegisterTransactionSetter(func(x *pb.DeleteRequest, t *pb.Transaction) { x.Transaction = t }) } // ErrConcurrentTransaction is returned when a transaction is rolled back due // to a conflict with a concurrent transaction. var ErrConcurrentTransaction = errors.New("datastore: concurrent transaction") // RunInTransaction runs f in a transaction. It calls f with a transaction // context tc that f should use for all App Engine operations. // // If f returns nil, RunInTransaction attempts to commit the transaction, // returning nil if it succeeds. If the commit fails due to a conflicting // transaction, RunInTransaction retries f, each time with a new transaction // context. It gives up and returns ErrConcurrentTransaction after three // failed attempts. The number of attempts can be configured by specifying // TransactionOptions.Attempts. // // If f returns non-nil, then any datastore changes will not be applied and // RunInTransaction returns that same error. The function f is not retried. // // Note that when f returns, the transaction is not yet committed. Calling code // must be careful not to assume that any of f's changes have been committed // until RunInTransaction returns nil. // // Since f may be called multiple times, f should usually be idempotent. // datastore.Get is not idempotent when unmarshaling slice fields. // // Nested transactions are not supported; c may not be a transaction context. func RunInTransaction(c context.Context, f func(tc context.Context) error, opts *TransactionOptions) error { xg := false if opts != nil { xg = opts.XG } readOnly := false if opts != nil { readOnly = opts.ReadOnly } attempts := 3 if opts != nil && opts.Attempts > 0 { attempts = opts.Attempts } var t *pb.Transaction var err error for i := 0; i < attempts; i++ { if t, err = internal.RunTransactionOnce(c, f, xg, readOnly, t); err != internal.ErrConcurrentTransaction { return err } } return ErrConcurrentTransaction } // TransactionOptions are the options for running a transaction. type TransactionOptions struct { // XG is whether the transaction can cross multiple entity groups. In // comparison, a single group transaction is one where all datastore keys // used have the same root key. Note that cross group transactions do not // have the same behavior as single group transactions. In particular, it // is much more likely to see partially applied transactions in different // entity groups, in global queries. // It is valid to set XG to true even if the transaction is within a // single entity group. XG bool // Attempts controls the number of retries to perform when commits fail // due to a conflicting transaction. If omitted, it defaults to 3. Attempts int // ReadOnly controls whether the transaction is a read only transaction. // Read only transactions are potentially more efficient. ReadOnly bool }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/metadata.go
// Copyright 2016 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 datastore import "context" // Datastore kinds for the metadata entities. const ( namespaceKind = "__namespace__" kindKind = "__kind__" propertyKind = "__property__" ) // Namespaces returns all the datastore namespaces. func Namespaces(ctx context.Context) ([]string, error) { // TODO(djd): Support range queries. q := NewQuery(namespaceKind).KeysOnly() keys, err := q.GetAll(ctx, nil) if err != nil { return nil, err } // The empty namespace key uses a numeric ID (==1), but luckily // the string ID defaults to "" for numeric IDs anyway. return keyNames(keys), nil } // Kinds returns the names of all the kinds in the current namespace. func Kinds(ctx context.Context) ([]string, error) { // TODO(djd): Support range queries. q := NewQuery(kindKind).KeysOnly() keys, err := q.GetAll(ctx, nil) if err != nil { return nil, err } return keyNames(keys), nil } // keyNames returns a slice of the provided keys' names (string IDs). func keyNames(keys []*Key) []string { n := make([]string, 0, len(keys)) for _, k := range keys { n = append(n, k.StringID()) } return n } // KindProperties returns all the indexed properties for the given kind. // The properties are returned as a map of property names to a slice of the // representation types. The representation types for the supported Go property // types are: // // "INT64": signed integers and time.Time // "DOUBLE": float32 and float64 // "BOOLEAN": bool // "STRING": string, []byte and ByteString // "POINT": appengine.GeoPoint // "REFERENCE": *Key // "USER": (not used in the Go runtime) func KindProperties(ctx context.Context, kind string) (map[string][]string, error) { // TODO(djd): Support range queries. kindKey := NewKey(ctx, kindKind, kind, 0, nil) q := NewQuery(propertyKind).Ancestor(kindKey) propMap := map[string][]string{} props := []struct { Repr []string `datastore:"property_representation"` }{} keys, err := q.GetAll(ctx, &props) if err != nil { return nil, err } for i, p := range props { propMap[keys[i].StringID()] = p.Repr } return propMap, nil }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/key.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 datastore import ( "bytes" "context" "encoding/base64" "encoding/gob" "errors" "fmt" "strconv" "strings" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/datastore" ) type KeyRangeCollisionError struct { start int64 end int64 } func (e *KeyRangeCollisionError) Error() string { return fmt.Sprintf("datastore: Collision when attempting to allocate range [%d, %d]", e.start, e.end) } type KeyRangeContentionError struct { start int64 end int64 } func (e *KeyRangeContentionError) Error() string { return fmt.Sprintf("datastore: Contention when attempting to allocate range [%d, %d]", e.start, e.end) } // Key represents the datastore key for a stored entity, and is immutable. type Key struct { kind string stringID string intID int64 parent *Key appID string namespace string } // Kind returns the key's kind (also known as entity type). func (k *Key) Kind() string { return k.kind } // StringID returns the key's string ID (also known as an entity name or key // name), which may be "". func (k *Key) StringID() string { return k.stringID } // IntID returns the key's integer ID, which may be 0. func (k *Key) IntID() int64 { return k.intID } // Parent returns the key's parent key, which may be nil. func (k *Key) Parent() *Key { return k.parent } // AppID returns the key's application ID. func (k *Key) AppID() string { return k.appID } // Namespace returns the key's namespace. func (k *Key) Namespace() string { return k.namespace } // Incomplete returns whether the key does not refer to a stored entity. // In particular, whether the key has a zero StringID and a zero IntID. func (k *Key) Incomplete() bool { return k.stringID == "" && k.intID == 0 } // valid returns whether the key is valid. func (k *Key) valid() bool { if k == nil { return false } for ; k != nil; k = k.parent { if k.kind == "" || k.appID == "" { return false } if k.stringID != "" && k.intID != 0 { return false } if k.parent != nil { if k.parent.Incomplete() { return false } if k.parent.appID != k.appID || k.parent.namespace != k.namespace { return false } } } return true } // Equal returns whether two keys are equal. func (k *Key) Equal(o *Key) bool { for k != nil && o != nil { if k.kind != o.kind || k.stringID != o.stringID || k.intID != o.intID || k.appID != o.appID || k.namespace != o.namespace { return false } k, o = k.parent, o.parent } return k == o } // root returns the furthest ancestor of a key, which may be itself. func (k *Key) root() *Key { for k.parent != nil { k = k.parent } return k } // marshal marshals the key's string representation to the buffer. func (k *Key) marshal(b *bytes.Buffer) { if k.parent != nil { k.parent.marshal(b) } b.WriteByte('/') b.WriteString(k.kind) b.WriteByte(',') if k.stringID != "" { b.WriteString(k.stringID) } else { b.WriteString(strconv.FormatInt(k.intID, 10)) } } // String returns a string representation of the key. func (k *Key) String() string { if k == nil { return "" } b := bytes.NewBuffer(make([]byte, 0, 512)) k.marshal(b) return b.String() } type gobKey struct { Kind string StringID string IntID int64 Parent *gobKey AppID string Namespace string } func keyToGobKey(k *Key) *gobKey { if k == nil { return nil } return &gobKey{ Kind: k.kind, StringID: k.stringID, IntID: k.intID, Parent: keyToGobKey(k.parent), AppID: k.appID, Namespace: k.namespace, } } func gobKeyToKey(gk *gobKey) *Key { if gk == nil { return nil } return &Key{ kind: gk.Kind, stringID: gk.StringID, intID: gk.IntID, parent: gobKeyToKey(gk.Parent), appID: gk.AppID, namespace: gk.Namespace, } } func (k *Key) GobEncode() ([]byte, error) { buf := new(bytes.Buffer) if err := gob.NewEncoder(buf).Encode(keyToGobKey(k)); err != nil { return nil, err } return buf.Bytes(), nil } func (k *Key) GobDecode(buf []byte) error { gk := new(gobKey) if err := gob.NewDecoder(bytes.NewBuffer(buf)).Decode(gk); err != nil { return err } *k = *gobKeyToKey(gk) return nil } func (k *Key) MarshalJSON() ([]byte, error) { return []byte(`"` + k.Encode() + `"`), nil } func (k *Key) UnmarshalJSON(buf []byte) error { if len(buf) < 2 || buf[0] != '"' || buf[len(buf)-1] != '"' { return errors.New("datastore: bad JSON key") } k2, err := DecodeKey(string(buf[1 : len(buf)-1])) if err != nil { return err } *k = *k2 return nil } // Encode returns an opaque representation of the key // suitable for use in HTML and URLs. // This is compatible with the Python and Java runtimes. func (k *Key) Encode() string { ref := keyToProto("", k) b, err := proto.Marshal(ref) if err != nil { panic(err) } // Trailing padding is stripped. return strings.TrimRight(base64.URLEncoding.EncodeToString(b), "=") } // DecodeKey decodes a key from the opaque representation returned by Encode. func DecodeKey(encoded string) (*Key, error) { // Re-add padding. if m := len(encoded) % 4; m != 0 { encoded += strings.Repeat("=", 4-m) } b, err := base64.URLEncoding.DecodeString(encoded) if err != nil { return nil, err } ref := new(pb.Reference) if err := proto.Unmarshal(b, ref); err != nil { // Couldn't decode it as an App Engine key, try decoding it as a key encoded by cloud.google.com/go/datastore. if k := decodeCloudKey(encoded); k != nil { return k, nil } return nil, err } return protoToKey(ref) } // NewIncompleteKey creates a new incomplete key. // kind cannot be empty. func NewIncompleteKey(c context.Context, kind string, parent *Key) *Key { return NewKey(c, kind, "", 0, parent) } // NewKey creates a new key. // kind cannot be empty. // Either one or both of stringID and intID must be zero. If both are zero, // the key returned is incomplete. // parent must either be a complete key or nil. func NewKey(c context.Context, kind, stringID string, intID int64, parent *Key) *Key { // If there's a parent key, use its namespace. // Otherwise, use any namespace attached to the context. var namespace string if parent != nil { namespace = parent.namespace } else { namespace = internal.NamespaceFromContext(c) } return &Key{ kind: kind, stringID: stringID, intID: intID, parent: parent, appID: internal.FullyQualifiedAppID(c), namespace: namespace, } } // AllocateIDs returns a range of n integer IDs with the given kind and parent // combination. kind cannot be empty; parent may be nil. The IDs in the range // returned will not be used by the datastore's automatic ID sequence generator // and may be used with NewKey without conflict. // // The range is inclusive at the low end and exclusive at the high end. In // other words, valid intIDs x satisfy low <= x && x < high. // // If no error is returned, low + n == high. func AllocateIDs(c context.Context, kind string, parent *Key, n int) (low, high int64, err error) { if kind == "" { return 0, 0, errors.New("datastore: AllocateIDs given an empty kind") } if n < 0 { return 0, 0, fmt.Errorf("datastore: AllocateIDs given a negative count: %d", n) } if n == 0 { return 0, 0, nil } req := &pb.AllocateIdsRequest{ ModelKey: keyToProto("", NewIncompleteKey(c, kind, parent)), Size: proto.Int64(int64(n)), } res := &pb.AllocateIdsResponse{} if err := internal.Call(c, "datastore_v3", "AllocateIds", req, res); err != nil { return 0, 0, err } // The protobuf is inclusive at both ends. Idiomatic Go (e.g. slices, for loops) // is inclusive at the low end and exclusive at the high end, so we add 1. low = res.GetStart() high = res.GetEnd() + 1 if low+int64(n) != high { return 0, 0, fmt.Errorf("datastore: internal error: could not allocate %d IDs", n) } return low, high, nil } // AllocateIDRange allocates a range of IDs with specific endpoints. // The range is inclusive at both the low and high end. Once these IDs have been // allocated, you can manually assign them to newly created entities. // // The Datastore's automatic ID allocator never assigns a key that has already // been allocated (either through automatic ID allocation or through an explicit // AllocateIDs call). As a result, entities written to the given key range will // never be overwritten. However, writing entities with manually assigned keys in // this range may overwrite existing entities (or new entities written by a separate // request), depending on the error returned. // // Use this only if you have an existing numeric ID range that you want to reserve // (for example, bulk loading entities that already have IDs). If you don't care // about which IDs you receive, use AllocateIDs instead. // // AllocateIDRange returns nil if the range is successfully allocated. If one or more // entities with an ID in the given range already exist, it returns a KeyRangeCollisionError. // If the Datastore has already cached IDs in this range (e.g. from a previous call to // AllocateIDRange), it returns a KeyRangeContentionError. Errors of other types indicate // problems with arguments or an error returned directly from the Datastore. func AllocateIDRange(c context.Context, kind string, parent *Key, start, end int64) (err error) { if kind == "" { return errors.New("datastore: AllocateIDRange given an empty kind") } if start < 1 || end < 1 { return errors.New("datastore: AllocateIDRange start and end must both be greater than 0") } if start > end { return errors.New("datastore: AllocateIDRange start must be before end") } req := &pb.AllocateIdsRequest{ ModelKey: keyToProto("", NewIncompleteKey(c, kind, parent)), Max: proto.Int64(end), } res := &pb.AllocateIdsResponse{} if err := internal.Call(c, "datastore_v3", "AllocateIds", req, res); err != nil { return err } // Check for collisions, i.e. existing entities with IDs in this range. // We could do this before the allocation, but we'd still have to do it // afterward as well to catch the race condition where an entity is inserted // after that initial check but before the allocation. Skip the up-front check // and just do it once. q := NewQuery(kind).Filter("__key__ >=", NewKey(c, kind, "", start, parent)). Filter("__key__ <=", NewKey(c, kind, "", end, parent)).KeysOnly().Limit(1) keys, err := q.GetAll(c, nil) if err != nil { return err } if len(keys) != 0 { return &KeyRangeCollisionError{start: start, end: end} } // Check for a race condition, i.e. cases where the datastore may have // cached ID batches that contain IDs in this range. if start < res.GetStart() { return &KeyRangeContentionError{start: start, end: end} } return nil }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/query_test.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 datastore import ( "errors" "fmt" "reflect" "strings" "testing" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" "google.golang.org/appengine/v2/internal/aetesting" pb "google.golang.org/appengine/v2/internal/datastore" ) var ( path1 = &pb.Path{ Element: []*pb.Path_Element{ { Type: proto.String("Gopher"), Id: proto.Int64(6), }, }, } path2 = &pb.Path{ Element: []*pb.Path_Element{ { Type: proto.String("Gopher"), Id: proto.Int64(6), }, { Type: proto.String("Gopher"), Id: proto.Int64(8), }, }, } ) func fakeRunQuery(in *pb.Query, out *pb.QueryResult) error { expectedIn := &pb.Query{ App: proto.String("dev~fake-app"), Kind: proto.String("Gopher"), Compile: proto.Bool(true), } if !proto.Equal(in, expectedIn) { return fmt.Errorf("unsupported argument: got %v want %v", in, expectedIn) } *out = pb.QueryResult{ Result: []*pb.EntityProto{ { Key: &pb.Reference{ App: proto.String("s~test-app"), Path: path1, }, EntityGroup: path1, Property: []*pb.Property{ { Meaning: pb.Property_TEXT.Enum(), Name: proto.String("Name"), Value: &pb.PropertyValue{ StringValue: proto.String("George"), }, }, { Name: proto.String("Height"), Value: &pb.PropertyValue{ Int64Value: proto.Int64(32), }, }, }, }, { Key: &pb.Reference{ App: proto.String("s~test-app"), Path: path2, }, EntityGroup: path1, // ancestor is George Property: []*pb.Property{ { Meaning: pb.Property_TEXT.Enum(), Name: proto.String("Name"), Value: &pb.PropertyValue{ StringValue: proto.String("Rufus"), }, }, // No height for Rufus. }, }, }, MoreResults: proto.Bool(false), } return nil } type StructThatImplementsPLS struct{} func (StructThatImplementsPLS) Load(p []Property) error { return nil } func (StructThatImplementsPLS) Save() ([]Property, error) { return nil, nil } var _ PropertyLoadSaver = StructThatImplementsPLS{} type StructPtrThatImplementsPLS struct{} func (*StructPtrThatImplementsPLS) Load(p []Property) error { return nil } func (*StructPtrThatImplementsPLS) Save() ([]Property, error) { return nil, nil } var _ PropertyLoadSaver = &StructPtrThatImplementsPLS{} type PropertyMap map[string]Property func (m PropertyMap) Load(props []Property) error { for _, p := range props { if p.Multiple { return errors.New("PropertyMap does not support multiple properties") } m[p.Name] = p } return nil } func (m PropertyMap) Save() ([]Property, error) { props := make([]Property, 0, len(m)) for _, p := range m { if p.Multiple { return nil, errors.New("PropertyMap does not support multiple properties") } props = append(props, p) } return props, nil } var _ PropertyLoadSaver = PropertyMap{} type Gopher struct { Name string Height int } // typeOfEmptyInterface is the type of interface{}, but we can't use // reflect.TypeOf((interface{})(nil)) directly because TypeOf takes an // interface{}. var typeOfEmptyInterface = reflect.TypeOf((*interface{})(nil)).Elem() func TestCheckMultiArg(t *testing.T) { testCases := []struct { v interface{} mat multiArgType elemType reflect.Type }{ // Invalid cases. {nil, multiArgTypeInvalid, nil}, {Gopher{}, multiArgTypeInvalid, nil}, {&Gopher{}, multiArgTypeInvalid, nil}, {PropertyList{}, multiArgTypeInvalid, nil}, // This is a special case. {PropertyMap{}, multiArgTypeInvalid, nil}, {[]*PropertyList(nil), multiArgTypeInvalid, nil}, {[]*PropertyMap(nil), multiArgTypeInvalid, nil}, {[]**Gopher(nil), multiArgTypeInvalid, nil}, {[]*interface{}(nil), multiArgTypeInvalid, nil}, // Valid cases. { []PropertyList(nil), multiArgTypePropertyLoadSaver, reflect.TypeOf(PropertyList{}), }, { []PropertyMap(nil), multiArgTypePropertyLoadSaver, reflect.TypeOf(PropertyMap{}), }, { []StructThatImplementsPLS(nil), multiArgTypePropertyLoadSaver, reflect.TypeOf(StructThatImplementsPLS{}), }, { []StructPtrThatImplementsPLS(nil), multiArgTypePropertyLoadSaver, reflect.TypeOf(StructPtrThatImplementsPLS{}), }, { []Gopher(nil), multiArgTypeStruct, reflect.TypeOf(Gopher{}), }, { []*Gopher(nil), multiArgTypeStructPtr, reflect.TypeOf(Gopher{}), }, { []interface{}(nil), multiArgTypeInterface, typeOfEmptyInterface, }, } for _, tc := range testCases { mat, elemType := checkMultiArg(reflect.ValueOf(tc.v)) if mat != tc.mat || elemType != tc.elemType { t.Errorf("checkMultiArg(%T): got %v, %v want %v, %v", tc.v, mat, elemType, tc.mat, tc.elemType) } } } func TestSimpleQuery(t *testing.T) { struct1 := Gopher{Name: "George", Height: 32} struct2 := Gopher{Name: "Rufus"} pList1 := PropertyList{ { Name: "Name", Value: "George", }, { Name: "Height", Value: int64(32), }, } pList2 := PropertyList{ { Name: "Name", Value: "Rufus", }, } pMap1 := PropertyMap{ "Name": Property{ Name: "Name", Value: "George", }, "Height": Property{ Name: "Height", Value: int64(32), }, } pMap2 := PropertyMap{ "Name": Property{ Name: "Name", Value: "Rufus", }, } testCases := []struct { dst interface{} want interface{} }{ // The destination must have type *[]P, *[]S or *[]*S, for some non-interface // type P such that *P implements PropertyLoadSaver, or for some struct type S. {new([]Gopher), &[]Gopher{struct1, struct2}}, {new([]*Gopher), &[]*Gopher{&struct1, &struct2}}, {new([]PropertyList), &[]PropertyList{pList1, pList2}}, {new([]PropertyMap), &[]PropertyMap{pMap1, pMap2}}, // Any other destination type is invalid. {0, nil}, {Gopher{}, nil}, {PropertyList{}, nil}, {PropertyMap{}, nil}, {[]int{}, nil}, {[]Gopher{}, nil}, {[]PropertyList{}, nil}, {new(int), nil}, {new(Gopher), nil}, {new(PropertyList), nil}, // This is a special case. {new(PropertyMap), nil}, {new([]int), nil}, {new([]map[int]int), nil}, {new([]map[string]Property), nil}, {new([]map[string]interface{}), nil}, {new([]*int), nil}, {new([]*map[int]int), nil}, {new([]*map[string]Property), nil}, {new([]*map[string]interface{}), nil}, {new([]**Gopher), nil}, {new([]*PropertyList), nil}, {new([]*PropertyMap), nil}, } for _, tc := range testCases { nCall := 0 c := aetesting.FakeSingleContext(t, "datastore_v3", "RunQuery", func(in *pb.Query, out *pb.QueryResult) error { nCall++ return fakeRunQuery(in, out) }) c = internal.WithAppIDOverride(c, "dev~fake-app") var ( expectedErr error expectedNCall int ) if tc.want == nil { expectedErr = ErrInvalidEntityType } else { expectedNCall = 1 } keys, err := NewQuery("Gopher").GetAll(c, tc.dst) if err != expectedErr { t.Errorf("dst type %T: got error [%v], want [%v]", tc.dst, err, expectedErr) continue } if nCall != expectedNCall { t.Errorf("dst type %T: Context.Call was called an incorrect number of times: got %d want %d", tc.dst, nCall, expectedNCall) continue } if err != nil { continue } key1 := NewKey(c, "Gopher", "", 6, nil) expectedKeys := []*Key{ key1, NewKey(c, "Gopher", "", 8, key1), } if l1, l2 := len(keys), len(expectedKeys); l1 != l2 { t.Errorf("dst type %T: got %d keys, want %d keys", tc.dst, l1, l2) continue } for i, key := range keys { if key.AppID() != "s~test-app" { t.Errorf(`dst type %T: Key #%d's AppID = %q, want "s~test-app"`, tc.dst, i, key.AppID()) continue } if !keysEqual(key, expectedKeys[i]) { t.Errorf("dst type %T: got key #%d %v, want %v", tc.dst, i, key, expectedKeys[i]) continue } } if !reflect.DeepEqual(tc.dst, tc.want) { t.Errorf("dst type %T: Entities got %+v, want %+v", tc.dst, tc.dst, tc.want) continue } } } // keysEqual is like (*Key).Equal, but ignores the App ID. func keysEqual(a, b *Key) bool { for a != nil && b != nil { if a.Kind() != b.Kind() || a.StringID() != b.StringID() || a.IntID() != b.IntID() { return false } a, b = a.Parent(), b.Parent() } return a == b } func TestQueriesAreImmutable(t *testing.T) { // Test that deriving q2 from q1 does not modify q1. q0 := NewQuery("foo") q1 := NewQuery("foo") q2 := q1.Offset(2) if !reflect.DeepEqual(q0, q1) { t.Errorf("q0 and q1 were not equal") } if reflect.DeepEqual(q1, q2) { t.Errorf("q1 and q2 were equal") } // Test that deriving from q4 twice does not conflict, even though // q4 has a long list of order clauses. This tests that the arrays // backed by a query's slice of orders are not shared. f := func() *Query { q := NewQuery("bar") // 47 is an ugly number that is unlikely to be near a re-allocation // point in repeated append calls. For example, it's not near a power // of 2 or a multiple of 10. for i := 0; i < 47; i++ { q = q.Order(fmt.Sprintf("x%d", i)) } return q } q3 := f().Order("y") q4 := f() q5 := q4.Order("y") q6 := q4.Order("z") if !reflect.DeepEqual(q3, q5) { t.Errorf("q3 and q5 were not equal") } if reflect.DeepEqual(q5, q6) { t.Errorf("q5 and q6 were equal") } } func TestFilterParser(t *testing.T) { testCases := []struct { filterStr string wantOK bool wantFieldName string wantOp operator }{ // Supported ops. {"x<", true, "x", lessThan}, {"x <", true, "x", lessThan}, {"x <", true, "x", lessThan}, {" x < ", true, "x", lessThan}, {"x <=", true, "x", lessEq}, {"x =", true, "x", equal}, {"x >=", true, "x", greaterEq}, {"x >", true, "x", greaterThan}, {"in >", true, "in", greaterThan}, {"in>", true, "in", greaterThan}, // Valid but (currently) unsupported ops. {"x!=", false, "", 0}, {"x !=", false, "", 0}, {" x != ", false, "", 0}, {"x IN", false, "", 0}, {"x in", false, "", 0}, // Invalid ops. {"x EQ", false, "", 0}, {"x lt", false, "", 0}, {"x <>", false, "", 0}, {"x >>", false, "", 0}, {"x ==", false, "", 0}, {"x =<", false, "", 0}, {"x =>", false, "", 0}, {"x !", false, "", 0}, {"x ", false, "", 0}, {"x", false, "", 0}, } for _, tc := range testCases { q := NewQuery("foo").Filter(tc.filterStr, 42) if ok := q.err == nil; ok != tc.wantOK { t.Errorf("%q: ok=%t, want %t", tc.filterStr, ok, tc.wantOK) continue } if !tc.wantOK { continue } if len(q.filter) != 1 { t.Errorf("%q: len=%d, want %d", tc.filterStr, len(q.filter), 1) continue } got, want := q.filter[0], filter{tc.wantFieldName, tc.wantOp, 42} if got != want { t.Errorf("%q: got %v, want %v", tc.filterStr, got, want) continue } } } func TestQueryToProto(t *testing.T) { // The context is required to make Keys for the test cases. var got *pb.Query NoErr := errors.New("No error") c := aetesting.FakeSingleContext(t, "datastore_v3", "RunQuery", func(in *pb.Query, out *pb.QueryResult) error { got = in return NoErr // return a non-nil error so Run doesn't keep going. }) c = internal.WithAppIDOverride(c, "dev~fake-app") testCases := []struct { desc string query *Query want *pb.Query err string }{ { desc: "empty", query: NewQuery(""), want: &pb.Query{}, }, { desc: "standard query", query: NewQuery("kind").Order("-I").Filter("I >", 17).Filter("U =", "Dave").Limit(7).Offset(42).BatchSize(5), want: &pb.Query{ Kind: proto.String("kind"), Filter: []*pb.Query_Filter{ { Op: pb.Query_Filter_GREATER_THAN.Enum(), Property: []*pb.Property{ { Name: proto.String("I"), Value: &pb.PropertyValue{Int64Value: proto.Int64(17)}, Multiple: proto.Bool(false), }, }, }, { Op: pb.Query_Filter_EQUAL.Enum(), Property: []*pb.Property{ { Name: proto.String("U"), Value: &pb.PropertyValue{StringValue: proto.String("Dave")}, Multiple: proto.Bool(false), }, }, }, }, Order: []*pb.Query_Order{ { Property: proto.String("I"), Direction: pb.Query_Order_DESCENDING.Enum(), }, }, Limit: proto.Int32(7), Offset: proto.Int32(42), Count: proto.Int32(5), }, }, { desc: "ancestor", query: NewQuery("").Ancestor(NewKey(c, "kind", "Mummy", 0, nil)), want: &pb.Query{ Ancestor: &pb.Reference{ App: proto.String("dev~fake-app"), Path: &pb.Path{ Element: []*pb.Path_Element{{Type: proto.String("kind"), Name: proto.String("Mummy")}}, }, }, }, }, { desc: "projection", query: NewQuery("").Project("A", "B"), want: &pb.Query{ PropertyName: []string{"A", "B"}, }, }, { desc: "projection with distinct", query: NewQuery("").Project("A", "B").Distinct(), want: &pb.Query{ PropertyName: []string{"A", "B"}, GroupByPropertyName: []string{"A", "B"}, }, }, { desc: "distinct on", query: NewQuery("").Project("A", "B").DistinctOn("A"), want: &pb.Query{ PropertyName: []string{"A", "B"}, GroupByPropertyName: []string{"A"}, }, }, { desc: "keys only", query: NewQuery("").KeysOnly(), want: &pb.Query{ KeysOnly: proto.Bool(true), RequirePerfectPlan: proto.Bool(true), }, }, { desc: "empty filter", query: NewQuery("kind").Filter("=", 17), err: "empty query filter field nam", }, { desc: "bad filter type", query: NewQuery("kind").Filter("M =", map[string]bool{}), err: "bad query filter value type", }, { desc: "bad filter operator", query: NewQuery("kind").Filter("I <<=", 17), err: `invalid operator "<<=" in filter "I <<="`, }, { desc: "empty order", query: NewQuery("kind").Order(""), err: "empty order", }, { desc: "bad order direction", query: NewQuery("kind").Order("+I"), err: `invalid order: "+I`, }, } for _, tt := range testCases { got = nil if _, err := tt.query.Run(c).Next(nil); err != NoErr { if tt.err == "" || !strings.Contains(err.Error(), tt.err) { t.Errorf("%s: error %v, want %q", tt.desc, err, tt.err) } continue } if tt.err != "" { t.Errorf("%s: no error, want %q", tt.desc, tt.err) continue } // Fields that are common to all protos. tt.want.App = proto.String("dev~fake-app") tt.want.Compile = proto.Bool(true) if !proto.Equal(got, tt.want) { t.Errorf("%s:\ngot %v\nwant %v", tt.desc, got, tt.want) } } }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/datastore_test.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 datastore import ( "encoding/json" "errors" "fmt" "os" "reflect" "sort" "strings" "testing" "time" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal/aetesting" pb "google.golang.org/appengine/v2/internal/datastore" ) const testAppID = "testApp" type ( myBlob []byte myByte byte myString string ) func makeMyByteSlice(n int) []myByte { b := make([]myByte, n) for i := range b { b[i] = myByte(i) } return b } func makeInt8Slice(n int) []int8 { b := make([]int8, n) for i := range b { b[i] = int8(i) } return b } func makeUint8Slice(n int) []uint8 { b := make([]uint8, n) for i := range b { b[i] = uint8(i) } return b } func newKey(stringID string, parent *Key) *Key { return &Key{ kind: "kind", stringID: stringID, intID: 0, parent: parent, appID: testAppID, } } var ( testKey0 = newKey("name0", nil) testKey1a = newKey("name1", nil) testKey1b = newKey("name1", nil) testKey2a = newKey("name2", testKey0) testKey2b = newKey("name2", testKey0) testGeoPt0 = appengine.GeoPoint{Lat: 1.2, Lng: 3.4} testGeoPt1 = appengine.GeoPoint{Lat: 5, Lng: 10} testBadGeoPt = appengine.GeoPoint{Lat: 1000, Lng: 34} now = time.Unix(1e9, 0).UTC() ) type B0 struct { B []byte } type B1 struct { B []int8 } type B2 struct { B myBlob } type B3 struct { B []myByte } type B4 struct { B [][]byte } type B5 struct { B ByteString } type C0 struct { I int C chan int } type C1 struct { I int C *chan int } type C2 struct { I int C []chan int } type C3 struct { C string } type E struct{} type G0 struct { G appengine.GeoPoint } type G1 struct { G []appengine.GeoPoint } type K0 struct { K *Key } type K1 struct { K []*Key } type S struct { St string } type NoOmit struct { A string B int `datastore:"Bb"` C bool `datastore:",noindex"` } type OmitAll struct { A string `datastore:",omitempty"` B int `datastore:"Bb,omitempty"` C bool `datastore:",omitempty,noindex"` D time.Time `datastore:",omitempty"` F []int `datastore:",omitempty"` } type Omit struct { A string `datastore:",omitempty"` B int `datastore:"Bb,omitempty"` C bool `datastore:",omitempty,noindex"` D time.Time `datastore:",omitempty"` F []int `datastore:",omitempty"` S `datastore:",omitempty"` } type NoOmits struct { No []NoOmit `datastore:",omitempty"` S `datastore:",omitempty"` Ss S `datastore:",omitempty"` } type N0 struct { X0 Nonymous X0 Ignore string `datastore:"-"` Other string } type N1 struct { X0 Nonymous []X0 Ignore string `datastore:"-"` Other string } type N2 struct { N1 `datastore:"red"` Green N1 `datastore:"green"` Blue N1 White N1 `datastore:"-"` } type O0 struct { I int64 } type O1 struct { I int32 } type U0 struct { U uint } type U1 struct { U string } type T struct { T time.Time } type X0 struct { S string I int i int } type X1 struct { S myString I int32 J int64 } type X2 struct { Z string i int } type X3 struct { S bool I int } type Y0 struct { B bool F []float64 G []float64 } type Y1 struct { B bool F float64 } type Y2 struct { B bool F []int64 } type Tagged struct { A int `datastore:"a,noindex"` B []int `datastore:"b"` C int `datastore:",noindex"` D int `datastore:""` E int // The "flatten" option is parsed but ignored for now. F int `datastore:",noindex,flatten"` G int `datastore:",flatten"` I int `datastore:"-"` J int `datastore:",noindex" json:"j"` Y0 `datastore:"-"` Z chan int `datastore:"-,"` } type InvalidTagged1 struct { I int `datastore:"\t"` } type InvalidTagged2 struct { I int J int `datastore:"I"` } type Inner1 struct { W int32 X string } type Inner2 struct { Y float64 } type Inner3 struct { Z bool } type Outer struct { A int16 I []Inner1 J Inner2 Inner3 } type OuterEquivalent struct { A int16 IDotW []int32 `datastore:"I.W"` IDotX []string `datastore:"I.X"` JDotY float64 `datastore:"J.Y"` Z bool } type Dotted struct { A DottedA `datastore:"A0.A1.A2"` } type DottedA struct { B DottedB `datastore:"B3"` } type DottedB struct { C int `datastore:"C4.C5"` } type SliceOfSlices struct { I int S []struct { J int F []float64 } } type Recursive struct { I int R []Recursive } type MutuallyRecursive0 struct { I int R []MutuallyRecursive1 } type MutuallyRecursive1 struct { I int R []MutuallyRecursive0 } type Doubler struct { S string I int64 B bool } type Repeat struct { Key string Value []byte } type Repeated struct { Repeats []Repeat } func (d *Doubler) Load(props []Property) error { return LoadStruct(d, props) } type EmbeddedTime struct { time.Time } type SpecialTime struct { MyTime EmbeddedTime } func (d *Doubler) Save() ([]Property, error) { // Save the default Property slice to an in-memory buffer (a PropertyList). props, err := SaveStruct(d) if err != nil { return nil, err } var list PropertyList if err := list.Load(props); err != nil { return nil, err } // Edit that PropertyList, and send it on. for i := range list { switch v := list[i].Value.(type) { case string: // + means string concatenation. list[i].Value = v + v case int64: // + means integer addition. list[i].Value = v + v } } return list.Save() } var _ PropertyLoadSaver = (*Doubler)(nil) type Deriver struct { S, Derived, Ignored string } func (e *Deriver) Load(props []Property) error { for _, p := range props { if p.Name != "S" { continue } e.S = p.Value.(string) e.Derived = "derived+" + e.S } return nil } func (e *Deriver) Save() ([]Property, error) { return []Property{ { Name: "S", Value: e.S, }, }, nil } var _ PropertyLoadSaver = (*Deriver)(nil) type BadMultiPropEntity struct{} func (e *BadMultiPropEntity) Load(props []Property) error { return errors.New("unimplemented") } func (e *BadMultiPropEntity) Save() ([]Property, error) { // Write multiple properties with the same name "I", but Multiple is false. var props []Property for i := 0; i < 3; i++ { props = append(props, Property{ Name: "I", Value: int64(i), }) } return props, nil } var _ PropertyLoadSaver = (*BadMultiPropEntity)(nil) type BK struct { Key appengine.BlobKey } type testCase struct { desc string src interface{} want interface{} putErr string getErr string } var testCases = []testCase{ { "chan save fails", &C0{I: -1}, &E{}, "unsupported struct field", "", }, { "*chan save fails", &C1{I: -1}, &E{}, "unsupported struct field", "", }, { "[]chan save fails", &C2{I: -1, C: make([]chan int, 8)}, &E{}, "unsupported struct field", "", }, { "chan load fails", &C3{C: "not a chan"}, &C0{}, "", "type mismatch", }, { "*chan load fails", &C3{C: "not a *chan"}, &C1{}, "", "type mismatch", }, { "[]chan load fails", &C3{C: "not a []chan"}, &C2{}, "", "type mismatch", }, { "empty struct", &E{}, &E{}, "", "", }, { "geopoint", &G0{G: testGeoPt0}, &G0{G: testGeoPt0}, "", "", }, { "geopoint invalid", &G0{G: testBadGeoPt}, &G0{}, "invalid GeoPoint value", "", }, { "geopoint as props", &G0{G: testGeoPt0}, &PropertyList{ Property{Name: "G", Value: testGeoPt0, NoIndex: false, Multiple: false}, }, "", "", }, { "geopoint slice", &G1{G: []appengine.GeoPoint{testGeoPt0, testGeoPt1}}, &G1{G: []appengine.GeoPoint{testGeoPt0, testGeoPt1}}, "", "", }, { "omit empty, all", &OmitAll{}, new(PropertyList), "", "", }, { "omit empty", &Omit{}, &PropertyList{ Property{Name: "St", Value: "", NoIndex: false, Multiple: false}, }, "", "", }, { "omit empty, fields populated", &Omit{ A: "a", B: 10, C: true, D: now, F: []int{11}, }, &PropertyList{ Property{Name: "A", Value: "a", NoIndex: false, Multiple: false}, Property{Name: "Bb", Value: int64(10), NoIndex: false, Multiple: false}, Property{Name: "C", Value: true, NoIndex: true, Multiple: false}, Property{Name: "D", Value: now, NoIndex: false, Multiple: false}, Property{Name: "F", Value: int64(11), NoIndex: false, Multiple: true}, Property{Name: "St", Value: "", NoIndex: false, Multiple: false}, }, "", "", }, { "omit empty, fields populated", &Omit{ A: "a", B: 10, C: true, D: now, F: []int{11}, S: S{St: "string"}, }, &PropertyList{ Property{Name: "A", Value: "a", NoIndex: false, Multiple: false}, Property{Name: "Bb", Value: int64(10), NoIndex: false, Multiple: false}, Property{Name: "C", Value: true, NoIndex: true, Multiple: false}, Property{Name: "D", Value: now, NoIndex: false, Multiple: false}, Property{Name: "F", Value: int64(11), NoIndex: false, Multiple: true}, Property{Name: "St", Value: "string", NoIndex: false, Multiple: false}, }, "", "", }, { "omit empty does not propagate", &NoOmits{ No: []NoOmit{ NoOmit{}, }, S: S{}, Ss: S{}, }, &PropertyList{ Property{Name: "No.A", Value: "", NoIndex: false, Multiple: true}, Property{Name: "No.Bb", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "No.C", Value: false, NoIndex: true, Multiple: true}, Property{Name: "Ss.St", Value: "", NoIndex: false, Multiple: false}, Property{Name: "St", Value: "", NoIndex: false, Multiple: false}}, "", "", }, { "key", &K0{K: testKey1a}, &K0{K: testKey1b}, "", "", }, { "key with parent", &K0{K: testKey2a}, &K0{K: testKey2b}, "", "", }, { "nil key", &K0{}, &K0{}, "", "", }, { "all nil keys in slice", &K1{[]*Key{nil, nil}}, &K1{[]*Key{nil, nil}}, "", "", }, { "some nil keys in slice", &K1{[]*Key{testKey1a, nil, testKey2a}}, &K1{[]*Key{testKey1b, nil, testKey2b}}, "", "", }, { "overflow", &O0{I: 1 << 48}, &O1{}, "", "overflow", }, { "time", &T{T: time.Unix(1e9, 0)}, &T{T: time.Unix(1e9, 0)}, "", "", }, { "time as props", &T{T: time.Unix(1e9, 0)}, &PropertyList{ Property{Name: "T", Value: time.Unix(1e9, 0).UTC(), NoIndex: false, Multiple: false}, }, "", "", }, { "uint save", &U0{U: 1}, &U0{}, "unsupported struct field", "", }, { "uint load", &U1{U: "not a uint"}, &U0{}, "", "type mismatch", }, { "zero", &X0{}, &X0{}, "", "", }, { "basic", &X0{S: "one", I: 2, i: 3}, &X0{S: "one", I: 2}, "", "", }, { "save string/int load myString/int32", &X0{S: "one", I: 2, i: 3}, &X1{S: "one", I: 2}, "", "", }, { "missing fields", &X0{S: "one", I: 2, i: 3}, &X2{}, "", "no such struct field", }, { "save string load bool", &X0{S: "one", I: 2, i: 3}, &X3{I: 2}, "", "type mismatch", }, { "basic slice", &Y0{B: true, F: []float64{7, 8, 9}}, &Y0{B: true, F: []float64{7, 8, 9}}, "", "", }, { "save []float64 load float64", &Y0{B: true, F: []float64{7, 8, 9}}, &Y1{B: true}, "", "requires a slice", }, { "save []float64 load []int64", &Y0{B: true, F: []float64{7, 8, 9}}, &Y2{B: true}, "", "type mismatch", }, { "single slice is too long", &Y0{F: make([]float64, maxIndexedProperties+1)}, &Y0{}, "too many indexed properties", "", }, { "two slices are too long", &Y0{F: make([]float64, maxIndexedProperties), G: make([]float64, maxIndexedProperties)}, &Y0{}, "too many indexed properties", "", }, { "one slice and one scalar are too long", &Y0{F: make([]float64, maxIndexedProperties), B: true}, &Y0{}, "too many indexed properties", "", }, { "slice of slices of bytes", &Repeated{ Repeats: []Repeat{ { Key: "key 1", Value: []byte("value 1"), }, { Key: "key 2", Value: []byte("value 2"), }, }, }, &Repeated{ Repeats: []Repeat{ { Key: "key 1", Value: []byte("value 1"), }, { Key: "key 2", Value: []byte("value 2"), }, }, }, "", "", }, { "long blob", &B0{B: makeUint8Slice(maxIndexedProperties + 1)}, &B0{B: makeUint8Slice(maxIndexedProperties + 1)}, "", "", }, { "long []int8 is too long", &B1{B: makeInt8Slice(maxIndexedProperties + 1)}, &B1{}, "too many indexed properties", "", }, { "short []int8", &B1{B: makeInt8Slice(3)}, &B1{B: makeInt8Slice(3)}, "", "", }, { "long myBlob", &B2{B: makeUint8Slice(maxIndexedProperties + 1)}, &B2{B: makeUint8Slice(maxIndexedProperties + 1)}, "", "", }, { "short myBlob", &B2{B: makeUint8Slice(3)}, &B2{B: makeUint8Slice(3)}, "", "", }, { "long []myByte", &B3{B: makeMyByteSlice(maxIndexedProperties + 1)}, &B3{B: makeMyByteSlice(maxIndexedProperties + 1)}, "", "", }, { "short []myByte", &B3{B: makeMyByteSlice(3)}, &B3{B: makeMyByteSlice(3)}, "", "", }, { "slice of blobs", &B4{B: [][]byte{ makeUint8Slice(3), makeUint8Slice(4), makeUint8Slice(5), }}, &B4{B: [][]byte{ makeUint8Slice(3), makeUint8Slice(4), makeUint8Slice(5), }}, "", "", }, { "short ByteString", &B5{B: ByteString(makeUint8Slice(3))}, &B5{B: ByteString(makeUint8Slice(3))}, "", "", }, { "short ByteString as props", &B5{B: ByteString(makeUint8Slice(3))}, &PropertyList{ Property{Name: "B", Value: ByteString(makeUint8Slice(3)), NoIndex: false, Multiple: false}, }, "", "", }, { "short ByteString into string", &B5{B: ByteString("legacy")}, &struct{ B string }{"legacy"}, "", "", }, { "[]byte must be noindex", &PropertyList{ Property{Name: "B", Value: makeUint8Slice(3), NoIndex: false}, }, nil, "cannot index a []byte valued Property", "", }, { "save tagged load props", &Tagged{A: 1, B: []int{21, 22, 23}, C: 3, D: 4, E: 5, F: 6, G: 7, I: 8, J: 9}, &PropertyList{ // A and B are renamed to a and b; A and C are noindex, I is ignored. // Indexed properties are loaded before raw properties. Thus, the // result is: b, b, b, D, E, a, c. Property{Name: "C", Value: int64(3), NoIndex: true, Multiple: false}, Property{Name: "D", Value: int64(4), NoIndex: false, Multiple: false}, Property{Name: "E", Value: int64(5), NoIndex: false, Multiple: false}, Property{Name: "F", Value: int64(6), NoIndex: true, Multiple: false}, Property{Name: "G", Value: int64(7), NoIndex: false, Multiple: false}, Property{Name: "J", Value: int64(9), NoIndex: true, Multiple: false}, Property{Name: "a", Value: int64(1), NoIndex: true, Multiple: false}, Property{Name: "b", Value: int64(21), NoIndex: false, Multiple: true}, Property{Name: "b", Value: int64(22), NoIndex: false, Multiple: true}, Property{Name: "b", Value: int64(23), NoIndex: false, Multiple: true}, }, "", "", }, { "save tagged load tagged", &Tagged{A: 1, B: []int{21, 22, 23}, C: 3, D: 4, E: 5, I: 6, J: 7}, &Tagged{A: 1, B: []int{21, 22, 23}, C: 3, D: 4, E: 5, J: 7}, "", "", }, { "save props load tagged", &PropertyList{ Property{Name: "A", Value: int64(11), NoIndex: true, Multiple: false}, Property{Name: "a", Value: int64(12), NoIndex: true, Multiple: false}, }, &Tagged{A: 12}, "", `cannot load field "A"`, }, { "invalid tagged1", &InvalidTagged1{I: 1}, &InvalidTagged1{}, "struct tag has invalid property name", "", }, { "invalid tagged2", &InvalidTagged2{I: 1, J: 2}, &InvalidTagged2{}, "struct tag has repeated property name", "", }, { "doubler", &Doubler{S: "s", I: 1, B: true}, &Doubler{S: "ss", I: 2, B: true}, "", "", }, { "save struct load props", &X0{S: "s", I: 1}, &PropertyList{ Property{Name: "I", Value: int64(1), NoIndex: false, Multiple: false}, Property{Name: "S", Value: "s", NoIndex: false, Multiple: false}, }, "", "", }, { "save props load struct", &PropertyList{ Property{Name: "S", Value: "s", NoIndex: false, Multiple: false}, Property{Name: "I", Value: int64(1), NoIndex: false, Multiple: false}, }, &X0{S: "s", I: 1}, "", "", }, { "nil-value props", &PropertyList{ Property{Name: "I", Value: nil, NoIndex: false, Multiple: false}, Property{Name: "B", Value: nil, NoIndex: false, Multiple: false}, Property{Name: "S", Value: nil, NoIndex: false, Multiple: false}, Property{Name: "F", Value: nil, NoIndex: false, Multiple: false}, Property{Name: "K", Value: nil, NoIndex: false, Multiple: false}, Property{Name: "T", Value: nil, NoIndex: false, Multiple: false}, Property{Name: "J", Value: nil, NoIndex: false, Multiple: true}, Property{Name: "J", Value: int64(7), NoIndex: false, Multiple: true}, Property{Name: "J", Value: nil, NoIndex: false, Multiple: true}, }, &struct { I int64 B bool S string F float64 K *Key T time.Time J []int64 }{ J: []int64{0, 7, 0}, }, "", "", }, { "save outer load props", &Outer{ A: 1, I: []Inner1{ {10, "ten"}, {20, "twenty"}, {30, "thirty"}, }, J: Inner2{ Y: 3.14, }, Inner3: Inner3{ Z: true, }, }, &PropertyList{ Property{Name: "A", Value: int64(1), NoIndex: false, Multiple: false}, Property{Name: "I.W", Value: int64(10), NoIndex: false, Multiple: true}, Property{Name: "I.W", Value: int64(20), NoIndex: false, Multiple: true}, Property{Name: "I.W", Value: int64(30), NoIndex: false, Multiple: true}, Property{Name: "I.X", Value: "ten", NoIndex: false, Multiple: true}, Property{Name: "I.X", Value: "twenty", NoIndex: false, Multiple: true}, Property{Name: "I.X", Value: "thirty", NoIndex: false, Multiple: true}, Property{Name: "J.Y", Value: float64(3.14), NoIndex: false, Multiple: false}, Property{Name: "Z", Value: true, NoIndex: false, Multiple: false}, }, "", "", }, { "save props load outer-equivalent", &PropertyList{ Property{Name: "A", Value: int64(1), NoIndex: false, Multiple: false}, Property{Name: "I.W", Value: int64(10), NoIndex: false, Multiple: true}, Property{Name: "I.X", Value: "ten", NoIndex: false, Multiple: true}, Property{Name: "I.W", Value: int64(20), NoIndex: false, Multiple: true}, Property{Name: "I.X", Value: "twenty", NoIndex: false, Multiple: true}, Property{Name: "I.W", Value: int64(30), NoIndex: false, Multiple: true}, Property{Name: "I.X", Value: "thirty", NoIndex: false, Multiple: true}, Property{Name: "J.Y", Value: float64(3.14), NoIndex: false, Multiple: false}, Property{Name: "Z", Value: true, NoIndex: false, Multiple: false}, }, &OuterEquivalent{ A: 1, IDotW: []int32{10, 20, 30}, IDotX: []string{"ten", "twenty", "thirty"}, JDotY: 3.14, Z: true, }, "", "", }, { "save outer-equivalent load outer", &OuterEquivalent{ A: 1, IDotW: []int32{10, 20, 30}, IDotX: []string{"ten", "twenty", "thirty"}, JDotY: 3.14, Z: true, }, &Outer{ A: 1, I: []Inner1{ {10, "ten"}, {20, "twenty"}, {30, "thirty"}, }, J: Inner2{ Y: 3.14, }, Inner3: Inner3{ Z: true, }, }, "", "", }, { "dotted names save", &Dotted{A: DottedA{B: DottedB{C: 88}}}, &PropertyList{ Property{Name: "A0.A1.A2.B3.C4.C5", Value: int64(88), NoIndex: false, Multiple: false}, }, "", "", }, { "dotted names load", &PropertyList{ Property{Name: "A0.A1.A2.B3.C4.C5", Value: int64(99), NoIndex: false, Multiple: false}, }, &Dotted{A: DottedA{B: DottedB{C: 99}}}, "", "", }, { "save struct load deriver", &X0{S: "s", I: 1}, &Deriver{S: "s", Derived: "derived+s"}, "", "", }, { "save deriver load struct", &Deriver{S: "s", Derived: "derived+s", Ignored: "ignored"}, &X0{S: "s"}, "", "", }, { "bad multi-prop entity", &BadMultiPropEntity{}, &BadMultiPropEntity{}, "Multiple is false", "", }, // Regression: CL 25062824 broke handling of appengine.BlobKey fields. { "appengine.BlobKey", &BK{Key: "blah"}, &BK{Key: "blah"}, "", "", }, { "zero time.Time", &T{T: time.Time{}}, &T{T: time.Time{}}, "", "", }, { "time.Time near Unix zero time", &T{T: time.Unix(0, 4e3)}, &T{T: time.Unix(0, 4e3)}, "", "", }, { "time.Time, far in the future", &T{T: time.Date(99999, 1, 1, 0, 0, 0, 0, time.UTC)}, &T{T: time.Date(99999, 1, 1, 0, 0, 0, 0, time.UTC)}, "", "", }, { "time.Time, very far in the past", &T{T: time.Date(-300000, 1, 1, 0, 0, 0, 0, time.UTC)}, &T{}, "time value out of range", "", }, { "time.Time, very far in the future", &T{T: time.Date(294248, 1, 1, 0, 0, 0, 0, time.UTC)}, &T{}, "time value out of range", "", }, { "structs", &N0{ X0: X0{S: "one", I: 2, i: 3}, Nonymous: X0{S: "four", I: 5, i: 6}, Ignore: "ignore", Other: "other", }, &N0{ X0: X0{S: "one", I: 2}, Nonymous: X0{S: "four", I: 5}, Other: "other", }, "", "", }, { "slice of structs", &N1{ X0: X0{S: "one", I: 2, i: 3}, Nonymous: []X0{ {S: "four", I: 5, i: 6}, {S: "seven", I: 8, i: 9}, {S: "ten", I: 11, i: 12}, {S: "thirteen", I: 14, i: 15}, }, Ignore: "ignore", Other: "other", }, &N1{ X0: X0{S: "one", I: 2}, Nonymous: []X0{ {S: "four", I: 5}, {S: "seven", I: 8}, {S: "ten", I: 11}, {S: "thirteen", I: 14}, }, Other: "other", }, "", "", }, { "structs with slices of structs", &N2{ N1: N1{ X0: X0{S: "rouge"}, Nonymous: []X0{ {S: "rosso0"}, {S: "rosso1"}, }, }, Green: N1{ X0: X0{S: "vert"}, Nonymous: []X0{ {S: "verde0"}, {S: "verde1"}, {S: "verde2"}, }, }, Blue: N1{ X0: X0{S: "bleu"}, Nonymous: []X0{ {S: "blu0"}, {S: "blu1"}, {S: "blu2"}, {S: "blu3"}, }, }, }, &N2{ N1: N1{ X0: X0{S: "rouge"}, Nonymous: []X0{ {S: "rosso0"}, {S: "rosso1"}, }, }, Green: N1{ X0: X0{S: "vert"}, Nonymous: []X0{ {S: "verde0"}, {S: "verde1"}, {S: "verde2"}, }, }, Blue: N1{ X0: X0{S: "bleu"}, Nonymous: []X0{ {S: "blu0"}, {S: "blu1"}, {S: "blu2"}, {S: "blu3"}, }, }, }, "", "", }, { "save structs load props", &N2{ N1: N1{ X0: X0{S: "rouge"}, Nonymous: []X0{ {S: "rosso0"}, {S: "rosso1"}, }, }, Green: N1{ X0: X0{S: "vert"}, Nonymous: []X0{ {S: "verde0"}, {S: "verde1"}, {S: "verde2"}, }, }, Blue: N1{ X0: X0{S: "bleu"}, Nonymous: []X0{ {S: "blu0"}, {S: "blu1"}, {S: "blu2"}, {S: "blu3"}, }, }, }, &PropertyList{ Property{Name: "Blue.I", Value: int64(0), NoIndex: false, Multiple: false}, Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.S", Value: "blu0", NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.S", Value: "blu1", NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.S", Value: "blu2", NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.S", Value: "blu3", NoIndex: false, Multiple: true}, Property{Name: "Blue.Other", Value: "", NoIndex: false, Multiple: false}, Property{Name: "Blue.S", Value: "bleu", NoIndex: false, Multiple: false}, Property{Name: "green.I", Value: int64(0), NoIndex: false, Multiple: false}, Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.S", Value: "verde0", NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.S", Value: "verde1", NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.S", Value: "verde2", NoIndex: false, Multiple: true}, Property{Name: "green.Other", Value: "", NoIndex: false, Multiple: false}, Property{Name: "green.S", Value: "vert", NoIndex: false, Multiple: false}, Property{Name: "red.I", Value: int64(0), NoIndex: false, Multiple: false}, Property{Name: "red.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "red.Nonymous.I", Value: int64(0), NoIndex: false, Multiple: true}, Property{Name: "red.Nonymous.S", Value: "rosso0", NoIndex: false, Multiple: true}, Property{Name: "red.Nonymous.S", Value: "rosso1", NoIndex: false, Multiple: true}, Property{Name: "red.Other", Value: "", NoIndex: false, Multiple: false}, Property{Name: "red.S", Value: "rouge", NoIndex: false, Multiple: false}, }, "", "", }, { "save props load structs with ragged fields", &PropertyList{ Property{Name: "red.S", Value: "rot", NoIndex: false, Multiple: false}, Property{Name: "green.Nonymous.I", Value: int64(10), NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.I", Value: int64(11), NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.I", Value: int64(12), NoIndex: false, Multiple: true}, Property{Name: "green.Nonymous.I", Value: int64(13), NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.S", Value: "blau0", NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.I", Value: int64(20), NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.S", Value: "blau1", NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.I", Value: int64(21), NoIndex: false, Multiple: true}, Property{Name: "Blue.Nonymous.S", Value: "blau2", NoIndex: false, Multiple: true}, }, &N2{ N1: N1{ X0: X0{S: "rot"}, }, Green: N1{ Nonymous: []X0{ {I: 10}, {I: 11}, {I: 12}, {I: 13}, }, }, Blue: N1{ Nonymous: []X0{ {S: "blau0", I: 20}, {S: "blau1", I: 21}, {S: "blau2"}, }, }, }, "", "", }, { "save structs with noindex tags", &struct { A struct { X string `datastore:",noindex"` Y string } `datastore:",noindex"` B struct { X string `datastore:",noindex"` Y string } }{}, &PropertyList{ Property{Name: "A.X", Value: "", NoIndex: true, Multiple: false}, Property{Name: "A.Y", Value: "", NoIndex: true, Multiple: false}, Property{Name: "B.X", Value: "", NoIndex: true, Multiple: false}, Property{Name: "B.Y", Value: "", NoIndex: false, Multiple: false}, }, "", "", }, { "embedded struct with name override", &struct { Inner1 `datastore:"foo"` }{}, &PropertyList{ Property{Name: "foo.W", Value: int64(0), NoIndex: false, Multiple: false}, Property{Name: "foo.X", Value: "", NoIndex: false, Multiple: false}, }, "", "", }, { "slice of slices", &SliceOfSlices{}, nil, "flattening nested structs leads to a slice of slices", "", }, { "recursive struct", &Recursive{}, nil, "recursive struct", "", }, { "mutually recursive struct", &MutuallyRecursive0{}, nil, "recursive struct", "", }, { "non-exported struct fields", &struct { i, J int64 }{i: 1, J: 2}, &PropertyList{ Property{Name: "J", Value: int64(2), NoIndex: false, Multiple: false}, }, "", "", }, { "json.RawMessage", &struct { J json.RawMessage }{ J: json.RawMessage("rawr"), }, &PropertyList{ Property{Name: "J", Value: []byte("rawr"), NoIndex: true, Multiple: false}, }, "", "", }, { "json.RawMessage to myBlob", &struct { B json.RawMessage }{ B: json.RawMessage("rawr"), }, &B2{B: myBlob("rawr")}, "", "", }, { "embedded time field", &SpecialTime{MyTime: EmbeddedTime{now}}, &SpecialTime{MyTime: EmbeddedTime{now}}, "", "", }, { "embedded time load", &PropertyList{ Property{Name: "MyTime.", Value: now, NoIndex: false, Multiple: false}, }, &SpecialTime{MyTime: EmbeddedTime{now}}, "", "", }, } // checkErr returns the empty string if either both want and err are zero, // or if want is a non-empty substring of err's string representation. func checkErr(want string, err error) string { if err != nil { got := err.Error() if want == "" || strings.Index(got, want) == -1 { return got } } else if want != "" { return fmt.Sprintf("want error %q", want) } return "" } func TestRoundTrip(t *testing.T) { for _, tc := range testCases { p, err := saveEntity(testAppID, testKey0, tc.src) if s := checkErr(tc.putErr, err); s != "" { t.Errorf("%s: save: %s", tc.desc, s) continue } if p == nil { continue } var got interface{} if _, ok := tc.want.(*PropertyList); ok { got = new(PropertyList) } else { got = reflect.New(reflect.TypeOf(tc.want).Elem()).Interface() } err = loadEntity(got, p) if s := checkErr(tc.getErr, err); s != "" { t.Errorf("%s: load: %s", tc.desc, s) continue } if pl, ok := got.(*PropertyList); ok { // Sort by name to make sure we have a deterministic order. sort.Stable(byName(*pl)) } equal := false if gotT, ok := got.(*T); ok { // Round tripping a time.Time can result in a different time.Location: Local instead of UTC. // We therefore test equality explicitly, instead of relying on reflect.DeepEqual. equal = gotT.T.Equal(tc.want.(*T).T) } else { equal = reflect.DeepEqual(got, tc.want) } if !equal { t.Errorf("%s: compare: got %v want %v", tc.desc, got, tc.want) continue } } } type byName PropertyList func (s byName) Len() int { return len(s) } func (s byName) Less(i, j int) bool { return s[i].Name < s[j].Name } func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func TestQueryConstruction(t *testing.T) { tests := []struct { q, exp *Query err string }{ { q: NewQuery("Foo"), exp: &Query{ kind: "Foo", limit: -1, }, }, { // Regular filtered query with standard spacing. q: NewQuery("Foo").Filter("foo >", 7), exp: &Query{ kind: "Foo", filter: []filter{ { FieldName: "foo", Op: greaterThan, Value: 7, }, }, limit: -1, }, }, { // Filtered query with no spacing. q: NewQuery("Foo").Filter("foo=", 6), exp: &Query{ kind: "Foo", filter: []filter{ { FieldName: "foo", Op: equal, Value: 6, }, }, limit: -1, }, }, { // Filtered query with funky spacing. q: NewQuery("Foo").Filter(" foo< ", 8), exp: &Query{ kind: "Foo", filter: []filter{ { FieldName: "foo", Op: lessThan, Value: 8, }, }, limit: -1, }, }, { // Filtered query with multicharacter op. q: NewQuery("Foo").Filter("foo >=", 9), exp: &Query{ kind: "Foo", filter: []filter{ { FieldName: "foo", Op: greaterEq, Value: 9, }, }, limit: -1, }, }, { // Query with ordering. q: NewQuery("Foo").Order("bar"), exp: &Query{ kind: "Foo", order: []order{ { FieldName: "bar", Direction: ascending, }, }, limit: -1, }, }, { // Query with reverse ordering, and funky spacing. q: NewQuery("Foo").Order(" - bar"), exp: &Query{ kind: "Foo", order: []order{ { FieldName: "bar", Direction: descending, }, }, limit: -1, }, }, { // Query with an empty ordering. q: NewQuery("Foo").Order(""), err: "empty order", }, { // Query with a + ordering. q: NewQuery("Foo").Order("+bar"), err: "invalid order", }, } for i, test := range tests { if test.q.err != nil { got := test.q.err.Error() if !strings.Contains(got, test.err) { t.Errorf("%d: error mismatch: got %q want something containing %q", i, got, test.err) } continue } if !reflect.DeepEqual(test.q, test.exp) { t.Errorf("%d: mismatch: got %v want %v", i, test.q, test.exp) } } } func TestStringMeaning(t *testing.T) { var xx [4]interface{} xx[0] = &struct { X string }{"xx0"} xx[1] = &struct { X string `datastore:",noindex"` }{"xx1"} xx[2] = &struct { X []byte }{[]byte("xx2")} xx[3] = &struct { X []byte `datastore:",noindex"` }{[]byte("xx3")} indexed := [4]bool{ true, false, false, // A []byte is always no-index. false, } want := [4]pb.Property_Meaning{ pb.Property_NO_MEANING, pb.Property_TEXT, pb.Property_BLOB, pb.Property_BLOB, } for i, x := range xx { props, err := SaveStruct(x) if err != nil { t.Errorf("i=%d: SaveStruct: %v", i, err) continue } e, err := propertiesToProto("appID", testKey0, props) if err != nil { t.Errorf("i=%d: propertiesToProto: %v", i, err) continue } var p *pb.Property switch { case indexed[i] && len(e.Property) == 1: p = e.Property[0] case !indexed[i] && len(e.RawProperty) == 1: p = e.RawProperty[0] default: t.Errorf("i=%d: EntityProto did not have expected property slice", i) continue } if got := p.GetMeaning(); got != want[i] { t.Errorf("i=%d: meaning: got %v, want %v", i, got, want[i]) continue } } } func TestNamespaceResetting(t *testing.T) { // These environment variables are necessary because *Query.Run will // call internal.FullyQualifiedAppID which checks these variables or falls // back to the Metadata service that is not available in tests. environ := []struct { key, value string }{ {"GAE_LONG_APP_ID", "my-app-id"}, {"GAE_PARTITION", "1"}, } for _, v := range environ { old := os.Getenv(v.key) os.Setenv(v.key, v.value) v.value = old } defer 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) } }() namec := make(chan *string, 1) c0 := aetesting.FakeSingleContext(t, "datastore_v3", "RunQuery", func(req *pb.Query, res *pb.QueryResult) error { namec <- req.NameSpace return fmt.Errorf("RPC error") }) // Check that wrapping c0 in a namespace twice works correctly. c1, err := appengine.Namespace(c0, "A") if err != nil { t.Fatalf("appengine.Namespace: %v", err) } c2, err := appengine.Namespace(c1, "") // should act as the original context if err != nil { t.Fatalf("appengine.Namespace: %v", err) } q := NewQuery("SomeKind") q.Run(c0) if ns := <-namec; ns != nil { t.Errorf(`RunQuery with c0: ns = %q, want nil`, *ns) } q.Run(c1) if ns := <-namec; ns == nil { t.Error(`RunQuery with c1: ns = nil, want "A"`) } else if *ns != "A" { t.Errorf(`RunQuery with c1: ns = %q, want "A"`, *ns) } q.Run(c2) if ns := <-namec; ns != nil { t.Errorf(`RunQuery with c2: ns = %q, want nil`, *ns) } }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/time_test.go
// Copyright 2012 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 datastore import ( "testing" "time" ) func TestUnixMicro(t *testing.T) { // Test that all these time.Time values survive a round trip to unix micros. testCases := []time.Time{ {}, time.Date(2, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(23, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(234, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(1000, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(1600, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(1700, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(1800, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(1900, 1, 1, 0, 0, 0, 0, time.UTC), time.Unix(-1e6, -1000), time.Unix(-1e6, 0), time.Unix(-1e6, +1000), time.Unix(-60, -1000), time.Unix(-60, 0), time.Unix(-60, +1000), time.Unix(-1, -1000), time.Unix(-1, 0), time.Unix(-1, +1000), time.Unix(0, -3000), time.Unix(0, -2000), time.Unix(0, -1000), time.Unix(0, 0), time.Unix(0, +1000), time.Unix(0, +2000), time.Unix(+60, -1000), time.Unix(+60, 0), time.Unix(+60, +1000), time.Unix(+1e6, -1000), time.Unix(+1e6, 0), time.Unix(+1e6, +1000), time.Date(1999, 12, 31, 23, 59, 59, 999000, time.UTC), time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(2006, 1, 2, 15, 4, 5, 678000, time.UTC), time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC), time.Date(3456, 1, 1, 0, 0, 0, 0, time.UTC), } for _, tc := range testCases { got := fromUnixMicro(toUnixMicro(tc)) if !got.Equal(tc) { t.Errorf("got %q, want %q", got, tc) } } // Test that a time.Time that isn't an integral number of microseconds // is not perfectly reconstructed after a round trip. t0 := time.Unix(0, 123) t1 := fromUnixMicro(toUnixMicro(t0)) if t1.Nanosecond()%1000 != 0 || t0.Nanosecond()%1000 == 0 { t.Errorf("quantization to µs: got %q with %d ns, started with %d ns", t1, t1.Nanosecond(), t0.Nanosecond()) } }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/keycompat_test.go
// Copyright 2019 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 datastore import ( "reflect" "testing" ) func TestKeyConversion(t *testing.T) { var tests = []struct { desc string key *Key encodedKey string }{ { desc: "A control test for legacy to legacy key conversion int as the key", key: &Key{ kind: "Person", intID: 1, appID: "glibrary", }, encodedKey: "aghnbGlicmFyeXIMCxIGUGVyc29uGAEM", }, { desc: "A control test for legacy to legacy key conversion string as the key", key: &Key{ kind: "Graph", stringID: "graph:7-day-active", appID: "glibrary", }, encodedKey: "aghnbGlicmFyeXIdCxIFR3JhcGgiEmdyYXBoOjctZGF5LWFjdGl2ZQw", }, // These are keys encoded with cloud.google.com/go/datastore // Standard int as the key { desc: "Convert new key format to old key with int id", key: &Key{ kind: "WordIndex", intID: 1033, appID: "glibrary", }, encodedKey: "Eg4KCVdvcmRJbmRleBCJCA", }, // These are keys encoded with cloud.google.com/go/datastore // Standard string { desc: "Convert new key format to old key with string id", key: &Key{ kind: "WordIndex", stringID: "IAmAnID", appID: "glibrary", }, encodedKey: "EhQKCVdvcmRJbmRleBoHSUFtQW5JRA", }, // These are keys encoded with cloud.google.com/go/datastore // ID String with parent as string { desc: "Convert new key format to old key with string id with a parent", key: &Key{ kind: "WordIndex", stringID: "IAmAnID", appID: "glibrary", parent: &Key{ kind: "LetterIndex", stringID: "IAmAnotherID", appID: "glibrary", }, }, encodedKey: "EhsKC0xldHRlckluZGV4GgxJQW1Bbm90aGVySUQSFAoJV29yZEluZGV4GgdJQW1BbklE", }, } // Simulate the key converter enablement keyConversion.appID = "glibrary" for _, tc := range tests { dk, err := DecodeKey(tc.encodedKey) if err != nil { t.Fatalf("DecodeKey: %v", err) } if !reflect.DeepEqual(dk, tc.key) { t.Errorf("%s: got %+v, want %+v", tc.desc, dk, tc.key) } } }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/prop_test.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 datastore import ( "reflect" "sort" "testing" "time" "google.golang.org/appengine/v2" ) func TestValidPropertyName(t *testing.T) { testCases := []struct { name string want bool }{ // Invalid names. {"", false}, {"'", false}, {".", false}, {"..", false}, {".foo", false}, {"0", false}, {"00", false}, {"X.X.4.X.X", false}, {"\n", false}, {"\x00", false}, {"abc\xffz", false}, {"foo.", false}, {"foo..", false}, {"foo..bar", false}, {"☃", false}, {`"`, false}, // Valid names. {"AB", true}, {"Abc", true}, {"X.X.X.X.X", true}, {"_", true}, {"_0", true}, {"a", true}, {"a_B", true}, {"f00", true}, {"f0o", true}, {"fo0", true}, {"foo", true}, {"foo.bar", true}, {"foo.bar.baz", true}, {"世界", true}, } for _, tc := range testCases { got := validPropertyName(tc.name) if got != tc.want { t.Errorf("%q: got %v, want %v", tc.name, got, tc.want) } } } func TestStructCodec(t *testing.T) { type oStruct struct { O int } type pStruct struct { P int Q int } type rStruct struct { R int S pStruct T oStruct oStruct } type uStruct struct { U int v int } type vStruct struct { V string `datastore:",noindex"` } oStructCodec := &structCodec{ fields: map[string]fieldCodec{ "O": {path: []int{0}}, }, complete: true, } pStructCodec := &structCodec{ fields: map[string]fieldCodec{ "P": {path: []int{0}}, "Q": {path: []int{1}}, }, complete: true, } rStructCodec := &structCodec{ fields: map[string]fieldCodec{ "R": {path: []int{0}}, "S": {path: []int{1}, structCodec: pStructCodec}, "T": {path: []int{2}, structCodec: oStructCodec}, "O": {path: []int{3, 0}}, }, complete: true, } uStructCodec := &structCodec{ fields: map[string]fieldCodec{ "U": {path: []int{0}}, }, complete: true, } vStructCodec := &structCodec{ fields: map[string]fieldCodec{ "V": {path: []int{0}, noIndex: true}, }, complete: true, } testCases := []struct { desc string structValue interface{} want *structCodec }{ { "oStruct", oStruct{}, oStructCodec, }, { "pStruct", pStruct{}, pStructCodec, }, { "rStruct", rStruct{}, rStructCodec, }, { "uStruct", uStruct{}, uStructCodec, }, { "non-basic fields", struct { B appengine.BlobKey K *Key T time.Time }{}, &structCodec{ fields: map[string]fieldCodec{ "B": {path: []int{0}}, "K": {path: []int{1}}, "T": {path: []int{2}}, }, complete: true, }, }, { "struct tags with ignored embed", struct { A int `datastore:"a,noindex"` B int `datastore:"b"` C int `datastore:",noindex"` D int `datastore:""` E int I int `datastore:"-"` J int `datastore:",noindex" json:"j"` oStruct `datastore:"-"` }{}, &structCodec{ fields: map[string]fieldCodec{ "a": {path: []int{0}, noIndex: true}, "b": {path: []int{1}}, "C": {path: []int{2}, noIndex: true}, "D": {path: []int{3}}, "E": {path: []int{4}}, "J": {path: []int{6}, noIndex: true}, }, complete: true, }, }, { "unexported fields", struct { A int b int C int `datastore:"x"` d int `datastore:"Y"` }{}, &structCodec{ fields: map[string]fieldCodec{ "A": {path: []int{0}}, "x": {path: []int{2}}, }, complete: true, }, }, { "nested and embedded structs", struct { A int B int CC oStruct DDD rStruct oStruct }{}, &structCodec{ fields: map[string]fieldCodec{ "A": {path: []int{0}}, "B": {path: []int{1}}, "CC": {path: []int{2}, structCodec: oStructCodec}, "DDD": {path: []int{3}, structCodec: rStructCodec}, "O": {path: []int{4, 0}}, }, complete: true, }, }, { "struct tags with nested and embedded structs", struct { A int `datastore:"-"` B int `datastore:"w"` C oStruct `datastore:"xx"` D rStruct `datastore:"y"` oStruct `datastore:"z"` }{}, &structCodec{ fields: map[string]fieldCodec{ "w": {path: []int{1}}, "xx": {path: []int{2}, structCodec: oStructCodec}, "y": {path: []int{3}, structCodec: rStructCodec}, "z.O": {path: []int{4, 0}}, }, complete: true, }, }, { "unexported nested and embedded structs", struct { a int B int c uStruct D uStruct uStruct }{}, &structCodec{ fields: map[string]fieldCodec{ "B": {path: []int{1}}, "D": {path: []int{3}, structCodec: uStructCodec}, "U": {path: []int{4, 0}}, }, complete: true, }, }, { "noindex nested struct", struct { A oStruct `datastore:",noindex"` }{}, &structCodec{ fields: map[string]fieldCodec{ "A": {path: []int{0}, structCodec: oStructCodec, noIndex: true}, }, complete: true, }, }, { "noindex slice", struct { A []string `datastore:",noindex"` }{}, &structCodec{ fields: map[string]fieldCodec{ "A": {path: []int{0}, noIndex: true}, }, hasSlice: true, complete: true, }, }, { "noindex embedded struct slice", struct { // vStruct has a single field, V, also with noindex. A []vStruct `datastore:",noindex"` }{}, &structCodec{ fields: map[string]fieldCodec{ "A": {path: []int{0}, structCodec: vStructCodec, noIndex: true}, }, hasSlice: true, complete: true, }, }, } for _, tc := range testCases { got, err := getStructCodec(reflect.TypeOf(tc.structValue)) if err != nil { t.Errorf("%s: getStructCodec: %v", tc.desc, err) continue } // can't reflect.DeepEqual b/c element order in fields map may differ if !isEqualStructCodec(got, tc.want) { t.Errorf("%s\ngot %+v\nwant %+v\n", tc.desc, got, tc.want) } } } func isEqualStructCodec(got, want *structCodec) bool { if got.complete != want.complete { return false } if got.hasSlice != want.hasSlice { return false } if len(got.fields) != len(want.fields) { return false } for name, wantF := range want.fields { gotF := got.fields[name] if !reflect.DeepEqual(wantF.path, gotF.path) { return false } if wantF.noIndex != gotF.noIndex { return false } if wantF.structCodec != nil { if gotF.structCodec == nil { return false } if !isEqualStructCodec(gotF.structCodec, wantF.structCodec) { return false } } } return true } func TestRepeatedPropertyName(t *testing.T) { good := []interface{}{ struct { A int `datastore:"-"` }{}, struct { A int `datastore:"b"` B int }{}, struct { A int B int `datastore:"B"` }{}, struct { A int `datastore:"B"` B int `datastore:"-"` }{}, struct { A int `datastore:"-"` B int `datastore:"A"` }{}, struct { A int `datastore:"B"` B int `datastore:"A"` }{}, struct { A int `datastore:"B"` B int `datastore:"C"` C int `datastore:"A"` }{}, struct { A int `datastore:"B"` B int `datastore:"C"` C int `datastore:"D"` }{}, } bad := []interface{}{ struct { A int `datastore:"B"` B int }{}, struct { A int B int `datastore:"A"` }{}, struct { A int `datastore:"C"` B int `datastore:"C"` }{}, struct { A int `datastore:"B"` B int `datastore:"C"` C int `datastore:"B"` }{}, } testGetStructCodec(t, good, bad) } func TestFlatteningNestedStructs(t *testing.T) { type DeepGood struct { A struct { B []struct { C struct { D int } } } } type DeepBad struct { A struct { B []struct { C struct { D []int } } } } type ISay struct { Tomato int } type YouSay struct { Tomato int } type Tweedledee struct { Dee int `datastore:"D"` } type Tweedledum struct { Dum int `datastore:"D"` } good := []interface{}{ struct { X []struct { Y string } }{}, struct { X []struct { Y []byte } }{}, struct { P []int X struct { Y []int } }{}, struct { X struct { Y []int } Q []int }{}, struct { P []int X struct { Y []int } Q []int }{}, struct { DeepGood }{}, struct { DG DeepGood }{}, struct { Foo struct { Z int } `datastore:"A"` Bar struct { Z int } `datastore:"B"` }{}, } bad := []interface{}{ struct { X []struct { Y []string } }{}, struct { X []struct { Y []int } }{}, struct { DeepBad }{}, struct { DB DeepBad }{}, struct { ISay YouSay }{}, struct { Tweedledee Tweedledum }{}, struct { Foo struct { Z int } `datastore:"A"` Bar struct { Z int } `datastore:"A"` }{}, } testGetStructCodec(t, good, bad) } func testGetStructCodec(t *testing.T, good []interface{}, bad []interface{}) { for _, x := range good { if _, err := getStructCodec(reflect.TypeOf(x)); err != nil { t.Errorf("type %T: got non-nil error (%s), want nil", x, err) } } for _, x := range bad { if _, err := getStructCodec(reflect.TypeOf(x)); err == nil { t.Errorf("type %T: got nil error, want non-nil", x) } } } func TestNilKeyIsStored(t *testing.T) { x := struct { K *Key I int }{} p := PropertyList{} // Save x as properties. p1, _ := SaveStruct(&x) p.Load(p1) // Set x's fields to non-zero. x.K = &Key{} x.I = 2 // Load x from properties. p2, _ := p.Save() LoadStruct(&x, p2) // Check that x's fields were set to zero. if x.K != nil { t.Errorf("K field was not zero") } if x.I != 0 { t.Errorf("I field was not zero") } } func TestSaveStructOmitEmpty(t *testing.T) { // Expected props names are sorted alphabetically expectedPropNamesForSingles := []string{"EmptyValue", "NonEmptyValue", "OmitEmptyWithValue"} expectedPropNamesForSlices := []string{"NonEmptyValue", "NonEmptyValue", "OmitEmptyWithValue", "OmitEmptyWithValue"} testOmitted := func(expectedPropNames []string, src interface{}) { // t.Helper() - this is available from Go version 1.9, but we also support Go versions 1.6, 1.7, 1.8 if props, err := SaveStruct(src); err != nil { t.Fatal(err) } else { // Collect names for reporting if diffs from expected and for easier sorting actualPropNames := make([]string, len(props)) for i := range props { actualPropNames[i] = props[i].Name } // Sort actuals for comparing with already sorted expected names sort.Sort(sort.StringSlice(actualPropNames)) if !reflect.DeepEqual(actualPropNames, expectedPropNames) { t.Errorf("Expected this properties: %v, got: %v", expectedPropNames, actualPropNames) } } } testOmitted(expectedPropNamesForSingles, &struct { EmptyValue int NonEmptyValue int OmitEmptyNoValue int `datastore:",omitempty"` OmitEmptyWithValue int `datastore:",omitempty"` }{ NonEmptyValue: 1, OmitEmptyWithValue: 2, }) testOmitted(expectedPropNamesForSlices, &struct { EmptyValue []int NonEmptyValue []int OmitEmptyNoValue []int `datastore:",omitempty"` OmitEmptyWithValue []int `datastore:",omitempty"` }{ NonEmptyValue: []int{1, 2}, OmitEmptyWithValue: []int{3, 4}, }) testOmitted(expectedPropNamesForSingles, &struct { EmptyValue bool NonEmptyValue bool OmitEmptyNoValue bool `datastore:",omitempty"` OmitEmptyWithValue bool `datastore:",omitempty"` }{ NonEmptyValue: true, OmitEmptyWithValue: true, }) testOmitted(expectedPropNamesForSlices, &struct { EmptyValue []bool NonEmptyValue []bool OmitEmptyNoValue []bool `datastore:",omitempty"` OmitEmptyWithValue []bool `datastore:",omitempty"` }{ NonEmptyValue: []bool{true, true}, OmitEmptyWithValue: []bool{true, true}, }) testOmitted(expectedPropNamesForSingles, &struct { EmptyValue string NonEmptyValue string OmitEmptyNoValue string `datastore:",omitempty"` OmitEmptyWithValue string `datastore:",omitempty"` }{ NonEmptyValue: "s", OmitEmptyWithValue: "s", }) testOmitted(expectedPropNamesForSlices, &struct { EmptyValue []string NonEmptyValue []string OmitEmptyNoValue []string `datastore:",omitempty"` OmitEmptyWithValue []string `datastore:",omitempty"` }{ NonEmptyValue: []string{"s1", "s2"}, OmitEmptyWithValue: []string{"s3", "s4"}, }) testOmitted(expectedPropNamesForSingles, &struct { EmptyValue float32 NonEmptyValue float32 OmitEmptyNoValue float32 `datastore:",omitempty"` OmitEmptyWithValue float32 `datastore:",omitempty"` }{ NonEmptyValue: 1.1, OmitEmptyWithValue: 1.2, }) testOmitted(expectedPropNamesForSlices, &struct { EmptyValue []float32 NonEmptyValue []float32 OmitEmptyNoValue []float32 `datastore:",omitempty"` OmitEmptyWithValue []float32 `datastore:",omitempty"` }{ NonEmptyValue: []float32{1.1, 2.2}, OmitEmptyWithValue: []float32{3.3, 4.4}, }) testOmitted(expectedPropNamesForSingles, &struct { EmptyValue time.Time NonEmptyValue time.Time OmitEmptyNoValue time.Time `datastore:",omitempty"` OmitEmptyWithValue time.Time `datastore:",omitempty"` }{ NonEmptyValue: now, OmitEmptyWithValue: now, }) testOmitted(expectedPropNamesForSlices, &struct { EmptyValue []time.Time NonEmptyValue []time.Time OmitEmptyNoValue []time.Time `datastore:",omitempty"` OmitEmptyWithValue []time.Time `datastore:",omitempty"` }{ NonEmptyValue: []time.Time{now, now}, OmitEmptyWithValue: []time.Time{now, now}, }) }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/key_test.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 datastore import ( "bytes" "context" "encoding/gob" "encoding/json" "testing" "google.golang.org/appengine/v2/internal" ) func TestKeyEncoding(t *testing.T) { testCases := []struct { desc string key *Key exp string }{ { desc: "A simple key with an int ID", key: &Key{ kind: "Person", intID: 1, appID: "glibrary", }, exp: "aghnbGlicmFyeXIMCxIGUGVyc29uGAEM", }, { desc: "A simple key with a string ID", key: &Key{ kind: "Graph", stringID: "graph:7-day-active", appID: "glibrary", }, exp: "aghnbGlicmFyeXIdCxIFR3JhcGgiEmdyYXBoOjctZGF5LWFjdGl2ZQw", }, { desc: "A key with a parent", key: &Key{ kind: "WordIndex", intID: 1033, parent: &Key{ kind: "WordIndex", intID: 1020032, appID: "glibrary", }, appID: "glibrary", }, exp: "aghnbGlicmFyeXIhCxIJV29yZEluZGV4GIChPgwLEglXb3JkSW5kZXgYiQgM", }, } for _, tc := range testCases { enc := tc.key.Encode() if enc != tc.exp { t.Errorf("%s: got %q, want %q", tc.desc, enc, tc.exp) } key, err := DecodeKey(tc.exp) if err != nil { t.Errorf("%s: failed decoding key: %v", tc.desc, err) continue } if !key.Equal(tc.key) { t.Errorf("%s: decoded key %v, want %v", tc.desc, key, tc.key) } } } func TestKeyGob(t *testing.T) { k := &Key{ kind: "Gopher", intID: 3, parent: &Key{ kind: "Mom", stringID: "narwhal", appID: "gopher-con", }, appID: "gopher-con", } buf := new(bytes.Buffer) if err := gob.NewEncoder(buf).Encode(k); err != nil { t.Fatalf("gob encode failed: %v", err) } k2 := new(Key) if err := gob.NewDecoder(buf).Decode(k2); err != nil { t.Fatalf("gob decode failed: %v", err) } if !k2.Equal(k) { t.Errorf("gob round trip of %v produced %v", k, k2) } } func TestNilKeyGob(t *testing.T) { type S struct { Key *Key } s1 := new(S) buf := new(bytes.Buffer) if err := gob.NewEncoder(buf).Encode(s1); err != nil { t.Fatalf("gob encode failed: %v", err) } s2 := new(S) if err := gob.NewDecoder(buf).Decode(s2); err != nil { t.Fatalf("gob decode failed: %v", err) } if s2.Key != nil { t.Errorf("gob round trip of nil key produced %v", s2.Key) } } func TestKeyJSON(t *testing.T) { k := &Key{ kind: "Gopher", intID: 2, parent: &Key{ kind: "Mom", stringID: "narwhal", appID: "gopher-con", }, appID: "gopher-con", } exp := `"` + k.Encode() + `"` buf, err := json.Marshal(k) if err != nil { t.Fatalf("json.Marshal failed: %v", err) } if s := string(buf); s != exp { t.Errorf("JSON encoding of key %v: got %q, want %q", k, s, exp) } k2 := new(Key) if err := json.Unmarshal(buf, k2); err != nil { t.Fatalf("json.Unmarshal failed: %v", err) } if !k2.Equal(k) { t.Errorf("JSON round trip of %v produced %v", k, k2) } } func TestNilKeyJSON(t *testing.T) { type S struct { Key *Key } s1 := new(S) buf, err := json.Marshal(s1) if err != nil { t.Fatalf("json.Marshal failed: %v", err) } s2 := new(S) if err := json.Unmarshal(buf, s2); err != nil { t.Fatalf("json.Unmarshal failed: %v", err) } if s2.Key != nil { t.Errorf("JSON round trip of nil key produced %v", s2.Key) } } func TestIncompleteKeyWithParent(t *testing.T) { c := internal.WithAppIDOverride(context.Background(), "s~some-app") // fadduh is a complete key. fadduh := NewKey(c, "Person", "", 1, nil) if fadduh.Incomplete() { t.Fatalf("fadduh is incomplete") } // robert is an incomplete key with fadduh as a parent. robert := NewIncompleteKey(c, "Person", fadduh) if !robert.Incomplete() { t.Fatalf("robert is complete") } // Both should be valid keys. if !fadduh.valid() { t.Errorf("fadduh is invalid: %v", fadduh) } if !robert.valid() { t.Errorf("robert is invalid: %v", robert) } } func TestNamespace(t *testing.T) { key := &Key{ kind: "Person", intID: 1, appID: "s~some-app", namespace: "mynamespace", } if g, w := key.Namespace(), "mynamespace"; g != w { t.Errorf("key.Namespace() = %q, want %q", g, w) } }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/load.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 datastore import ( "fmt" "reflect" "strings" "time" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" pb "google.golang.org/appengine/v2/internal/datastore" ) var ( typeOfBlobKey = reflect.TypeOf(appengine.BlobKey("")) typeOfByteSlice = reflect.TypeOf([]byte(nil)) typeOfByteString = reflect.TypeOf(ByteString(nil)) typeOfGeoPoint = reflect.TypeOf(appengine.GeoPoint{}) typeOfTime = reflect.TypeOf(time.Time{}) typeOfKeyPtr = reflect.TypeOf(&Key{}) typeOfEntityPtr = reflect.TypeOf(&Entity{}) ) // typeMismatchReason returns a string explaining why the property p could not // be stored in an entity field of type v.Type(). func typeMismatchReason(pValue interface{}, v reflect.Value) string { entityType := "empty" switch pValue.(type) { case int64: entityType = "int" case bool: entityType = "bool" case string: entityType = "string" case float64: entityType = "float" case *Key: entityType = "*datastore.Key" case time.Time: entityType = "time.Time" case appengine.BlobKey: entityType = "appengine.BlobKey" case appengine.GeoPoint: entityType = "appengine.GeoPoint" case ByteString: entityType = "datastore.ByteString" case []byte: entityType = "[]byte" } return fmt.Sprintf("type mismatch: %s versus %v", entityType, v.Type()) } type propertyLoader struct { // m holds the number of times a substruct field like "Foo.Bar.Baz" has // been seen so far. The map is constructed lazily. m map[string]int } func (l *propertyLoader) load(codec *structCodec, structValue reflect.Value, p Property, requireSlice bool) string { var v reflect.Value var sliceIndex int name := p.Name // If name ends with a '.', the last field is anonymous. // In this case, strings.Split will give us "" as the // last element of our fields slice, which will match the "" // field name in the substruct codec. fields := strings.Split(name, ".") for len(fields) > 0 { var decoder fieldCodec var ok bool // Cut off the last field (delimited by ".") and find its parent // in the codec. // eg. for name "A.B.C.D", split off "A.B.C" and try to // find a field in the codec with this name. // Loop again with "A.B", etc. for i := len(fields); i > 0; i-- { parent := strings.Join(fields[:i], ".") decoder, ok = codec.fields[parent] if ok { fields = fields[i:] break } } // If we never found a matching field in the codec, return // error message. if !ok { return "no such struct field" } v = initField(structValue, decoder.path) if !v.IsValid() { return "no such struct field" } if !v.CanSet() { return "cannot set struct field" } if decoder.structCodec != nil { codec = decoder.structCodec structValue = v } if v.Kind() == reflect.Slice && v.Type() != typeOfByteSlice { if l.m == nil { l.m = make(map[string]int) } sliceIndex = l.m[p.Name] l.m[p.Name] = sliceIndex + 1 for v.Len() <= sliceIndex { v.Set(reflect.Append(v, reflect.New(v.Type().Elem()).Elem())) } structValue = v.Index(sliceIndex) requireSlice = false } } var slice reflect.Value if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { slice = v v = reflect.New(v.Type().Elem()).Elem() } else if requireSlice { return "multiple-valued property requires a slice field type" } // Convert indexValues to a Go value with a meaning derived from the // destination type. pValue := p.Value if iv, ok := pValue.(indexValue); ok { meaning := pb.Property_NO_MEANING switch v.Type() { case typeOfBlobKey: meaning = pb.Property_BLOBKEY case typeOfByteSlice: meaning = pb.Property_BLOB case typeOfByteString: meaning = pb.Property_BYTESTRING case typeOfGeoPoint: meaning = pb.Property_GEORSS_POINT case typeOfTime: meaning = pb.Property_GD_WHEN case typeOfEntityPtr: meaning = pb.Property_ENTITY_PROTO } var err error pValue, err = propValue(iv.value, meaning) if err != nil { return err.Error() } } if errReason := setVal(v, pValue); errReason != "" { // Set the slice back to its zero value. if slice.IsValid() { slice.Set(reflect.Zero(slice.Type())) } return errReason } if slice.IsValid() { slice.Index(sliceIndex).Set(v) } return "" } // setVal sets v to the value pValue. func setVal(v reflect.Value, pValue interface{}) string { switch v.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: x, ok := pValue.(int64) if !ok && pValue != nil { return typeMismatchReason(pValue, v) } if v.OverflowInt(x) { return fmt.Sprintf("value %v overflows struct field of type %v", x, v.Type()) } v.SetInt(x) case reflect.Bool: x, ok := pValue.(bool) if !ok && pValue != nil { return typeMismatchReason(pValue, v) } v.SetBool(x) case reflect.String: switch x := pValue.(type) { case appengine.BlobKey: v.SetString(string(x)) case ByteString: v.SetString(string(x)) case string: v.SetString(x) default: if pValue != nil { return typeMismatchReason(pValue, v) } } case reflect.Float32, reflect.Float64: x, ok := pValue.(float64) if !ok && pValue != nil { return typeMismatchReason(pValue, v) } if v.OverflowFloat(x) { return fmt.Sprintf("value %v overflows struct field of type %v", x, v.Type()) } v.SetFloat(x) case reflect.Ptr: x, ok := pValue.(*Key) if !ok && pValue != nil { return typeMismatchReason(pValue, v) } if _, ok := v.Interface().(*Key); !ok { return typeMismatchReason(pValue, v) } v.Set(reflect.ValueOf(x)) case reflect.Struct: switch v.Type() { case typeOfTime: x, ok := pValue.(time.Time) if !ok && pValue != nil { return typeMismatchReason(pValue, v) } v.Set(reflect.ValueOf(x)) case typeOfGeoPoint: x, ok := pValue.(appengine.GeoPoint) if !ok && pValue != nil { return typeMismatchReason(pValue, v) } v.Set(reflect.ValueOf(x)) default: ent, ok := pValue.(*Entity) if !ok { return typeMismatchReason(pValue, v) } // Recursively load nested struct pls, err := newStructPLS(v.Addr().Interface()) if err != nil { return err.Error() } // if ent has a Key value and our struct has a Key field, // load the Entity's Key value into the Key field on the struct. if ent.Key != nil && pls.codec.keyField != -1 { pls.v.Field(pls.codec.keyField).Set(reflect.ValueOf(ent.Key)) } err = pls.Load(ent.Properties) if err != nil { return err.Error() } } case reflect.Slice: x, ok := pValue.([]byte) if !ok { if y, yok := pValue.(ByteString); yok { x, ok = []byte(y), true } } if !ok && pValue != nil { return typeMismatchReason(pValue, v) } if v.Type().Elem().Kind() != reflect.Uint8 { return typeMismatchReason(pValue, v) } v.SetBytes(x) default: return typeMismatchReason(pValue, v) } return "" } // initField is similar to reflect's Value.FieldByIndex, in that it // returns the nested struct field corresponding to index, but it // initialises any nil pointers encountered when traversing the structure. func initField(val reflect.Value, index []int) reflect.Value { for _, i := range index[:len(index)-1] { val = val.Field(i) if val.Kind() == reflect.Ptr { if val.IsNil() { val.Set(reflect.New(val.Type().Elem())) } val = val.Elem() } } return val.Field(index[len(index)-1]) } // loadEntity loads an EntityProto into PropertyLoadSaver or struct pointer. func loadEntity(dst interface{}, src *pb.EntityProto) (err error) { ent, err := protoToEntity(src) if err != nil { return err } if e, ok := dst.(PropertyLoadSaver); ok { return e.Load(ent.Properties) } return LoadStruct(dst, ent.Properties) } func (s structPLS) Load(props []Property) error { var fieldName, reason string var l propertyLoader for _, p := range props { if errStr := l.load(s.codec, s.v, p, p.Multiple); errStr != "" { // We don't return early, as we try to load as many properties as possible. // It is valid to load an entity into a struct that cannot fully represent it. // That case returns an error, but the caller is free to ignore it. fieldName, reason = p.Name, errStr } } if reason != "" { return &ErrFieldMismatch{ StructType: s.v.Type(), FieldName: fieldName, Reason: reason, } } return nil } func protoToEntity(src *pb.EntityProto) (*Entity, error) { props, rawProps := src.Property, src.RawProperty outProps := make([]Property, 0, len(props)+len(rawProps)) for { var ( x *pb.Property noIndex bool ) if len(props) > 0 { x, props = props[0], props[1:] } else if len(rawProps) > 0 { x, rawProps = rawProps[0], rawProps[1:] noIndex = true } else { break } var value interface{} if x.Meaning != nil && *x.Meaning == pb.Property_INDEX_VALUE { value = indexValue{x.Value} } else { var err error value, err = propValue(x.Value, x.GetMeaning()) if err != nil { return nil, err } } outProps = append(outProps, Property{ Name: x.GetName(), Value: value, NoIndex: noIndex, Multiple: x.GetMultiple(), }) } var key *Key if src.Key != nil { // Ignore any error, since nested entity values // are allowed to have an invalid key. key, _ = protoToKey(src.Key) } return &Entity{key, outProps}, nil } // propValue returns a Go value that combines the raw PropertyValue with a // meaning. For example, an Int64Value with GD_WHEN becomes a time.Time. func propValue(v *pb.PropertyValue, m pb.Property_Meaning) (interface{}, error) { switch { case v.Int64Value != nil: if m == pb.Property_GD_WHEN { return fromUnixMicro(*v.Int64Value), nil } else { return *v.Int64Value, nil } case v.BooleanValue != nil: return *v.BooleanValue, nil case v.StringValue != nil: if m == pb.Property_BLOB { return []byte(*v.StringValue), nil } else if m == pb.Property_BLOBKEY { return appengine.BlobKey(*v.StringValue), nil } else if m == pb.Property_BYTESTRING { return ByteString(*v.StringValue), nil } else if m == pb.Property_ENTITY_PROTO { var ent pb.EntityProto err := proto.Unmarshal([]byte(*v.StringValue), &ent) if err != nil { return nil, err } return protoToEntity(&ent) } else { return *v.StringValue, nil } case v.DoubleValue != nil: return *v.DoubleValue, nil case v.Referencevalue != nil: key, err := referenceValueToKey(v.Referencevalue) if err != nil { return nil, err } return key, nil case v.Pointvalue != nil: // NOTE: Strangely, latitude maps to X, longitude to Y. return appengine.GeoPoint{Lat: v.Pointvalue.GetX(), Lng: v.Pointvalue.GetY()}, nil } return nil, nil } // indexValue is a Property value that is created when entities are loaded from // an index, such as from a projection query. // // Such Property values do not contain all of the metadata required to be // faithfully represented as a Go value, and are instead represented as an // opaque indexValue. Load the properties into a concrete struct type (e.g. by // passing a struct pointer to Iterator.Next) to reconstruct actual Go values // of type int, string, time.Time, etc. type indexValue struct { value *pb.PropertyValue }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/load_test.go
// Copyright 2016 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 datastore import ( "reflect" "testing" proto "github.com/golang/protobuf/proto" pb "google.golang.org/appengine/v2/internal/datastore" ) type Simple struct { I int64 } type SimpleWithTag struct { I int64 `datastore:"II"` } type NestedSimpleWithTag struct { A SimpleWithTag `datastore:"AA"` } type NestedSliceOfSimple struct { A []Simple } type SimpleTwoFields struct { S string SS string } type NestedSimpleAnonymous struct { Simple X string } type NestedSimple struct { A Simple I int64 } type NestedSimple1 struct { A Simple X string } type NestedSimple2X struct { AA NestedSimple A SimpleTwoFields S string } type BDotB struct { B string `datastore:"B.B"` } type ABDotB struct { A BDotB } type MultiAnonymous struct { Simple SimpleTwoFields X string } var ( // these values need to be addressable testString2 = "two" testString3 = "three" testInt64 = int64(2) fieldNameI = "I" fieldNameX = "X" fieldNameS = "S" fieldNameSS = "SS" fieldNameADotI = "A.I" fieldNameAADotII = "AA.II" fieldNameADotBDotB = "A.B.B" ) func TestLoadEntityNestedLegacy(t *testing.T) { testCases := []struct { desc string src *pb.EntityProto want interface{} }{ { "nested", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameX, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, &pb.Property{ Name: &fieldNameADotI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, }, }, }, &NestedSimple1{ A: Simple{I: testInt64}, X: testString2, }, }, { "nested with tag", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameAADotII, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, }, }, }, &NestedSimpleWithTag{ A: SimpleWithTag{I: testInt64}, }, }, { "nested with anonymous struct field", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameX, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, &pb.Property{ Name: &fieldNameI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, }, }, }, &NestedSimpleAnonymous{ Simple: Simple{I: testInt64}, X: testString2, }, }, { "nested with dotted field tag", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameADotBDotB, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, }, }, &ABDotB{ A: BDotB{ B: testString2, }, }, }, { "nested with dotted field tag", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, }, &pb.Property{ Name: &fieldNameS, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, &pb.Property{ Name: &fieldNameSS, Value: &pb.PropertyValue{ StringValue: &testString3, }, }, &pb.Property{ Name: &fieldNameX, Value: &pb.PropertyValue{ StringValue: &testString3, }, }, }, }, &MultiAnonymous{ Simple: Simple{I: testInt64}, SimpleTwoFields: SimpleTwoFields{S: "two", SS: "three"}, X: "three", }, }, } for _, tc := range testCases { dst := reflect.New(reflect.TypeOf(tc.want).Elem()).Interface() err := loadEntity(dst, tc.src) if err != nil { t.Errorf("loadEntity: %s: %v", tc.desc, err) continue } if !reflect.DeepEqual(tc.want, dst) { t.Errorf("%s: compare:\ngot: %#v\nwant: %#v", tc.desc, dst, tc.want) } } } type WithKey struct { X string I int64 K *Key `datastore:"__key__"` } type NestedWithKey struct { N WithKey Y string } var ( incompleteKey = newKey("", nil) invalidKey = newKey("s", incompleteKey) // these values need to be addressable fieldNameA = "A" fieldNameK = "K" fieldNameN = "N" fieldNameY = "Y" fieldNameAA = "AA" fieldNameII = "II" fieldNameBDotB = "B.B" entityProtoMeaning = pb.Property_ENTITY_PROTO TRUE = true FALSE = false ) var ( simpleEntityProto, nestedSimpleEntityProto, simpleTwoFieldsEntityProto, simpleWithTagEntityProto, bDotBEntityProto, withKeyEntityProto string ) func init() { // simpleEntityProto corresponds to: // Simple{I: testInt64} simpleEntityProtob, err := proto.Marshal(&pb.EntityProto{ Key: keyToProto("", incompleteKey), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, Multiple: &FALSE, }, }, EntityGroup: &pb.Path{}, }) if err != nil { panic(err) } simpleEntityProto = string(simpleEntityProtob) // nestedSimpleEntityProto corresponds to: // NestedSimple{ // A: Simple{I: testInt64}, // I: testInt64, // } nestedSimpleEntityProtob, err := proto.Marshal(&pb.EntityProto{ Key: keyToProto("", incompleteKey), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameA, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ StringValue: &simpleEntityProto, }, Multiple: &FALSE, }, &pb.Property{ Name: &fieldNameI, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, Multiple: &FALSE, }, }, EntityGroup: &pb.Path{}, }) if err != nil { panic(err) } nestedSimpleEntityProto = string(nestedSimpleEntityProtob) // simpleTwoFieldsEntityProto corresponds to: // SimpleTwoFields{S: testString2, SS: testString3} simpleTwoFieldsEntityProtob, err := proto.Marshal(&pb.EntityProto{ Key: keyToProto("", incompleteKey), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameS, Value: &pb.PropertyValue{ StringValue: &testString2, }, Multiple: &FALSE, }, &pb.Property{ Name: &fieldNameSS, Value: &pb.PropertyValue{ StringValue: &testString3, }, Multiple: &FALSE, }, }, EntityGroup: &pb.Path{}, }) if err != nil { panic(err) } simpleTwoFieldsEntityProto = string(simpleTwoFieldsEntityProtob) // simpleWithTagEntityProto corresponds to: // SimpleWithTag{I: testInt64} simpleWithTagEntityProtob, err := proto.Marshal(&pb.EntityProto{ Key: keyToProto("", incompleteKey), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameII, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, Multiple: &FALSE, }, }, EntityGroup: &pb.Path{}, }) if err != nil { panic(err) } simpleWithTagEntityProto = string(simpleWithTagEntityProtob) // bDotBEntityProto corresponds to: // BDotB{ // B: testString2, // } bDotBEntityProtob, err := proto.Marshal(&pb.EntityProto{ Key: keyToProto("", incompleteKey), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameBDotB, Value: &pb.PropertyValue{ StringValue: &testString2, }, Multiple: &FALSE, }, }, EntityGroup: &pb.Path{}, }) if err != nil { panic(err) } bDotBEntityProto = string(bDotBEntityProtob) // withKeyEntityProto corresponds to: // WithKey{ // X: testString3, // I: testInt64, // K: testKey1a, // } withKeyEntityProtob, err := proto.Marshal(&pb.EntityProto{ Key: keyToProto("", testKey1a), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameX, Value: &pb.PropertyValue{ StringValue: &testString3, }, Multiple: &FALSE, }, &pb.Property{ Name: &fieldNameI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, Multiple: &FALSE, }, }, EntityGroup: &pb.Path{}, }) if err != nil { panic(err) } withKeyEntityProto = string(withKeyEntityProtob) } func TestLoadEntityNested(t *testing.T) { testCases := []struct { desc string src *pb.EntityProto want interface{} }{ { "nested basic", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameA, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ StringValue: &simpleEntityProto, }, }, &pb.Property{ Name: &fieldNameI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, }, }, }, &NestedSimple{ A: Simple{I: 2}, I: 2, }, }, { "nested with struct tags", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameAA, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ StringValue: &simpleWithTagEntityProto, }, }, }, }, &NestedSimpleWithTag{ A: SimpleWithTag{I: testInt64}, }, }, { "nested 2x", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameAA, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ StringValue: &nestedSimpleEntityProto, }, }, &pb.Property{ Name: &fieldNameA, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ StringValue: &simpleTwoFieldsEntityProto, }, }, &pb.Property{ Name: &fieldNameS, Value: &pb.PropertyValue{ StringValue: &testString3, }, }, }, }, &NestedSimple2X{ AA: NestedSimple{ A: Simple{I: testInt64}, I: testInt64, }, A: SimpleTwoFields{S: testString2, SS: testString3}, S: testString3, }, }, { "nested anonymous", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, }, &pb.Property{ Name: &fieldNameX, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, }, }, &NestedSimpleAnonymous{ Simple: Simple{I: testInt64}, X: testString2, }, }, { "nested simple with slice", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameA, Meaning: &entityProtoMeaning, Multiple: &TRUE, Value: &pb.PropertyValue{ StringValue: &simpleEntityProto, }, }, &pb.Property{ Name: &fieldNameA, Meaning: &entityProtoMeaning, Multiple: &TRUE, Value: &pb.PropertyValue{ StringValue: &simpleEntityProto, }, }, }, }, &NestedSliceOfSimple{ A: []Simple{Simple{I: testInt64}, Simple{I: testInt64}}, }, }, { "nested with multiple anonymous fields", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameI, Value: &pb.PropertyValue{ Int64Value: &testInt64, }, }, &pb.Property{ Name: &fieldNameS, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, &pb.Property{ Name: &fieldNameSS, Value: &pb.PropertyValue{ StringValue: &testString3, }, }, &pb.Property{ Name: &fieldNameX, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, }, }, &MultiAnonymous{ Simple: Simple{I: testInt64}, SimpleTwoFields: SimpleTwoFields{S: testString2, SS: testString3}, X: testString2, }, }, { "nested with dotted field tag", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameA, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ StringValue: &bDotBEntityProto, }, }, }, }, &ABDotB{ A: BDotB{ B: testString2, }, }, }, { "nested entity with key", &pb.EntityProto{ Key: keyToProto("some-app-id", testKey0), Property: []*pb.Property{ &pb.Property{ Name: &fieldNameY, Value: &pb.PropertyValue{ StringValue: &testString2, }, }, &pb.Property{ Name: &fieldNameN, Meaning: &entityProtoMeaning, Value: &pb.PropertyValue{ StringValue: &withKeyEntityProto, }, }, }, }, &NestedWithKey{ Y: testString2, N: WithKey{ X: testString3, I: testInt64, K: testKey1a, }, }, }, } for _, tc := range testCases { dst := reflect.New(reflect.TypeOf(tc.want).Elem()).Interface() err := loadEntity(dst, tc.src) if err != nil { t.Errorf("loadEntity: %s: %v", tc.desc, err) continue } if !reflect.DeepEqual(tc.want, dst) { t.Errorf("%s: compare:\ngot: %#v\nwant: %#v", tc.desc, dst, tc.want) } } }
cloudpb
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/internal/cloudpb/entity.pb.go
// Copyright 2019 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 cloudpb is a subset of protobufs, copied from google.golang.org/genproto/googleapis/datastore/v1. // // They are copied here to provide compatibility to decode keys generated by the cloud.google.com/go/datastore package. package cloudpb import ( "fmt" "github.com/golang/protobuf/proto" ) // A partition ID identifies a grouping of entities. The grouping is always // by project and namespace, however the namespace ID may be empty. // // A partition ID contains several dimensions: // project ID and namespace ID. // // Partition dimensions: // // - May be `""`. // - Must be valid UTF-8 bytes. // - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` // If the value of any dimension matches regex `__.*__`, the partition is // reserved/read-only. // A reserved/read-only partition ID is forbidden in certain documented // contexts. // // Foreign partition IDs (in which the project ID does // not match the context project ID ) are discouraged. // Reads and writes of foreign partition IDs may fail if the project is not in // an active state. type PartitionId struct { // The ID of the project to which the entities belong. ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` // If not empty, the ID of the namespace to which the entities belong. NamespaceId string `protobuf:"bytes,4,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *PartitionId) Reset() { *m = PartitionId{} } func (m *PartitionId) String() string { return proto.CompactTextString(m) } func (*PartitionId) ProtoMessage() {} func (*PartitionId) Descriptor() ([]byte, []int) { return fileDescriptor_entity_096a297364b049a5, []int{0} } func (m *PartitionId) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PartitionId.Unmarshal(m, b) } func (m *PartitionId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PartitionId.Marshal(b, m, deterministic) } func (dst *PartitionId) XXX_Merge(src proto.Message) { xxx_messageInfo_PartitionId.Merge(dst, src) } func (m *PartitionId) XXX_Size() int { return xxx_messageInfo_PartitionId.Size(m) } func (m *PartitionId) XXX_DiscardUnknown() { xxx_messageInfo_PartitionId.DiscardUnknown(m) } var xxx_messageInfo_PartitionId proto.InternalMessageInfo func (m *PartitionId) GetProjectId() string { if m != nil { return m.ProjectId } return "" } func (m *PartitionId) GetNamespaceId() string { if m != nil { return m.NamespaceId } return "" } // A unique identifier for an entity. // If a key's partition ID or any of its path kinds or names are // reserved/read-only, the key is reserved/read-only. // A reserved/read-only key is forbidden in certain documented contexts. type Key struct { // Entities are partitioned into subsets, currently identified by a project // ID and namespace ID. // Queries are scoped to a single partition. PartitionId *PartitionId `protobuf:"bytes,1,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` // The entity path. // An entity path consists of one or more elements composed of a kind and a // string or numerical identifier, which identify entities. The first // element identifies a _root entity_, the second element identifies // a _child_ of the root entity, the third element identifies a child of the // second entity, and so forth. The entities identified by all prefixes of // the path are called the element's _ancestors_. // // An entity path is always fully complete: *all* of the entity's ancestors // are required to be in the path along with the entity identifier itself. // The only exception is that in some documented cases, the identifier in the // last path element (for the entity) itself may be omitted. For example, // the last path element of the key of `Mutation.insert` may have no // identifier. // // A path can never be empty, and a path can have at most 100 elements. Path []*Key_PathElement `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Key) Reset() { *m = Key{} } func (m *Key) String() string { return proto.CompactTextString(m) } func (*Key) ProtoMessage() {} func (*Key) Descriptor() ([]byte, []int) { return fileDescriptor_entity_096a297364b049a5, []int{1} } func (m *Key) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Key.Unmarshal(m, b) } func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Key.Marshal(b, m, deterministic) } func (dst *Key) XXX_Merge(src proto.Message) { xxx_messageInfo_Key.Merge(dst, src) } func (m *Key) XXX_Size() int { return xxx_messageInfo_Key.Size(m) } func (m *Key) XXX_DiscardUnknown() { xxx_messageInfo_Key.DiscardUnknown(m) } // A (kind, ID/name) pair used to construct a key path. // // If either name or ID is set, the element is complete. // If neither is set, the element is incomplete. type Key_PathElement struct { // The kind of the entity. // A kind matching regex `__.*__` is reserved/read-only. // A kind must not contain more than 1500 bytes when UTF-8 encoded. // Cannot be `""`. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` // The type of ID. // // Types that are valid to be assigned to IdType: // *Key_PathElement_Id // *Key_PathElement_Name IdType isKey_PathElement_IdType `protobuf_oneof:"id_type"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Key_PathElement) Reset() { *m = Key_PathElement{} } func (m *Key_PathElement) String() string { return proto.CompactTextString(m) } func (*Key_PathElement) ProtoMessage() {} func (*Key_PathElement) Descriptor() ([]byte, []int) { return fileDescriptor_entity_096a297364b049a5, []int{1, 0} } func (m *Key_PathElement) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Key_PathElement.Unmarshal(m, b) } func (m *Key_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Key_PathElement.Marshal(b, m, deterministic) } func (dst *Key_PathElement) XXX_Merge(src proto.Message) { xxx_messageInfo_Key_PathElement.Merge(dst, src) } func (m *Key_PathElement) XXX_Size() int { return xxx_messageInfo_Key_PathElement.Size(m) } func (m *Key_PathElement) XXX_DiscardUnknown() { xxx_messageInfo_Key_PathElement.DiscardUnknown(m) } var xxx_messageInfo_Key_PathElement proto.InternalMessageInfo func (m *Key_PathElement) GetKind() string { if m != nil { return m.Kind } return "" } type isKey_PathElement_IdType interface { isKey_PathElement_IdType() } type Key_PathElement_Id struct { Id int64 `protobuf:"varint,2,opt,name=id,proto3,oneof"` } type Key_PathElement_Name struct { Name string `protobuf:"bytes,3,opt,name=name,proto3,oneof"` } func (*Key_PathElement_Id) isKey_PathElement_IdType() {} func (*Key_PathElement_Name) isKey_PathElement_IdType() {} func (m *Key_PathElement) GetIdType() isKey_PathElement_IdType { if m != nil { return m.IdType } return nil } func (m *Key_PathElement) GetId() int64 { if x, ok := m.GetIdType().(*Key_PathElement_Id); ok { return x.Id } return 0 } func (m *Key_PathElement) GetName() string { if x, ok := m.GetIdType().(*Key_PathElement_Name); ok { return x.Name } return "" } // XXX_OneofFuncs is for the internal use of the proto package. func (*Key_PathElement) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _Key_PathElement_OneofMarshaler, _Key_PathElement_OneofUnmarshaler, _Key_PathElement_OneofSizer, []interface{}{ (*Key_PathElement_Id)(nil), (*Key_PathElement_Name)(nil), } } func _Key_PathElement_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*Key_PathElement) // id_type switch x := m.IdType.(type) { case *Key_PathElement_Id: b.EncodeVarint(2<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.Id)) case *Key_PathElement_Name: b.EncodeVarint(3<<3 | proto.WireBytes) b.EncodeStringBytes(x.Name) case nil: default: return fmt.Errorf("Key_PathElement.IdType has unexpected type %T", x) } return nil } func _Key_PathElement_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*Key_PathElement) switch tag { case 2: // id_type.id if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.IdType = &Key_PathElement_Id{int64(x)} return true, err case 3: // id_type.name if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.IdType = &Key_PathElement_Name{x} return true, err default: return false, nil } } func _Key_PathElement_OneofSizer(msg proto.Message) (n int) { m := msg.(*Key_PathElement) // id_type switch x := m.IdType.(type) { case *Key_PathElement_Id: n += 1 // tag and wire n += proto.SizeVarint(uint64(x.Id)) case *Key_PathElement_Name: n += 1 // tag and wire n += proto.SizeVarint(uint64(len(x.Name))) n += len(x.Name) case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) } return n } var fileDescriptor_entity_096a297364b049a5 = []byte{ // 780 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xff, 0x6e, 0xdc, 0x44, 0x10, 0xc7, 0xed, 0xbb, 0x5c, 0x1a, 0x8f, 0xdd, 0xa4, 0x6c, 0x2a, 0x61, 0x02, 0x28, 0x26, 0x80, 0x74, 0x02, 0xc9, 0x6e, 0xc2, 0x1f, 0x54, 0x14, 0xa4, 0x72, 0x25, 0xe0, 0x28, 0x15, 0x9c, 0x56, 0x55, 0x24, 0x50, 0xa4, 0xd3, 0xde, 0x79, 0xeb, 0x2e, 0x67, 0xef, 0x5a, 0xf6, 0x3a, 0xaa, 0xdf, 0x05, 0xf1, 0x00, 0x3c, 0x0a, 0x8f, 0x80, 0x78, 0x18, 0xb4, 0x3f, 0xec, 0x0b, 0xed, 0x35, 0xff, 0x79, 0x67, 0x3e, 0xdf, 0xd9, 0xef, 0xec, 0xce, 0x1a, 0xa2, 0x5c, 0x88, 0xbc, 0xa0, 0x49, 0x46, 0x24, 0x69, 0xa4, 0xa8, 0x69, 0x72, 0x73, 0x9a, 0x50, 0x2e, 0x99, 0xec, 0xe2, 0xaa, 0x16, 0x52, 0xa0, 0x43, 0x43, 0xc4, 0x03, 0x11, 0xdf, 0x9c, 0x1e, 0x7d, 0x64, 0x65, 0xa4, 0x62, 0x09, 0xe1, 0x5c, 0x48, 0x22, 0x99, 0xe0, 0x8d, 0x91, 0x0c, 0x59, 0xbd, 0x5a, 0xb6, 0x2f, 0x93, 0x46, 0xd6, 0xed, 0x4a, 0xda, 0xec, 0xf1, 0x9b, 0x59, 0xc9, 0x4a, 0xda, 0x48, 0x52, 0x56, 0x16, 0x08, 0x2d, 0x20, 0xbb, 0x8a, 0x26, 0x05, 0x91, 0x05, 0xcf, 0x4d, 0xe6, 0xe4, 0x17, 0xf0, 0xe7, 0xa4, 0x96, 0x4c, 0x6d, 0x76, 0x91, 0xa1, 0x8f, 0x01, 0xaa, 0x5a, 0xfc, 0x4e, 0x57, 0x72, 0xc1, 0xb2, 0x70, 0x14, 0xb9, 0x53, 0x0f, 0x7b, 0x36, 0x72, 0x91, 0xa1, 0x4f, 0x20, 0xe0, 0xa4, 0xa4, 0x4d, 0x45, 0x56, 0x54, 0x01, 0x3b, 0x1a, 0xf0, 0x87, 0xd8, 0x45, 0x76, 0xf2, 0x8f, 0x0b, 0xe3, 0x4b, 0xda, 0xa1, 0x67, 0x10, 0x54, 0x7d, 0x61, 0x85, 0xba, 0x91, 0x3b, 0xf5, 0xcf, 0xa2, 0x78, 0x4b, 0xef, 0xf1, 0x2d, 0x07, 0xd8, 0xaf, 0x6e, 0xd9, 0x79, 0x0c, 0x3b, 0x15, 0x91, 0xaf, 0xc2, 0x51, 0x34, 0x9e, 0xfa, 0x67, 0x9f, 0x6d, 0x15, 0x5f, 0xd2, 0x2e, 0x9e, 0x13, 0xf9, 0xea, 0xbc, 0xa0, 0x25, 0xe5, 0x12, 0x6b, 0xc5, 0xd1, 0x0b, 0xd5, 0xd7, 0x10, 0x44, 0x08, 0x76, 0xd6, 0x8c, 0x1b, 0x17, 0x1e, 0xd6, 0xdf, 0xe8, 0x01, 0x8c, 0x6c, 0x8f, 0xe3, 0xd4, 0xc1, 0x23, 0x96, 0xa1, 0x87, 0xb0, 0xa3, 0x5a, 0x09, 0xc7, 0x8a, 0x4a, 0x1d, 0xac, 0x57, 0x33, 0x0f, 0xee, 0xb1, 0x6c, 0xa1, 0x8e, 0xee, 0xe4, 0x29, 0xc0, 0xf7, 0x75, 0x4d, 0xba, 0x2b, 0x52, 0xb4, 0x14, 0x9d, 0xc1, 0xee, 0x8d, 0xfa, 0x68, 0x42, 0x57, 0xfb, 0x3b, 0xda, 0xea, 0x4f, 0xb3, 0xd8, 0x92, 0x27, 0x7f, 0x4c, 0x60, 0x62, 0xd4, 0x4f, 0x00, 0x78, 0x5b, 0x14, 0x0b, 0x9d, 0x08, 0xfd, 0xc8, 0x9d, 0xee, 0x6f, 0x2a, 0xf4, 0x37, 0x19, 0xff, 0xdc, 0x16, 0x85, 0xe6, 0x53, 0x07, 0x7b, 0xbc, 0x5f, 0xa0, 0xcf, 0xe1, 0xfe, 0x52, 0x88, 0x82, 0x12, 0x6e, 0xf5, 0xaa, 0xb1, 0xbd, 0xd4, 0xc1, 0x81, 0x0d, 0x0f, 0x18, 0xe3, 0x92, 0xe6, 0xb4, 0xb6, 0x58, 0xdf, 0x6d, 0x60, 0xc3, 0x06, 0xfb, 0x14, 0x82, 0x4c, 0xb4, 0xcb, 0x82, 0x5a, 0x4a, 0xf5, 0xef, 0xa6, 0x0e, 0xf6, 0x4d, 0xd4, 0x40, 0xe7, 0x70, 0x30, 0x8c, 0x95, 0xe5, 0x40, 0xdf, 0xe9, 0xdb, 0xa6, 0x5f, 0xf4, 0x5c, 0xea, 0xe0, 0xfd, 0x41, 0x64, 0xca, 0x7c, 0x0d, 0xde, 0x9a, 0x76, 0xb6, 0xc0, 0x44, 0x17, 0x08, 0xdf, 0x75, 0xaf, 0xa9, 0x83, 0xf7, 0xd6, 0xb4, 0x1b, 0x4c, 0x36, 0xb2, 0x66, 0x3c, 0xb7, 0xda, 0xf7, 0xec, 0x25, 0xf9, 0x26, 0x6a, 0xa0, 0x63, 0x80, 0x65, 0x21, 0x96, 0x16, 0x41, 0x91, 0x3b, 0x0d, 0xd4, 0xc1, 0xa9, 0x98, 0x01, 0xbe, 0x83, 0x83, 0x9c, 0x8a, 0x45, 0x25, 0x18, 0x97, 0x96, 0xda, 0xd3, 0x26, 0x0e, 0x7b, 0x13, 0xea, 0xa2, 0xe3, 0xe7, 0x44, 0x3e, 0xe7, 0x79, 0xea, 0xe0, 0xfb, 0x39, 0x15, 0x73, 0x05, 0x1b, 0xf9, 0x53, 0x08, 0xcc, 0x53, 0xb6, 0xda, 0x5d, 0xad, 0xfd, 0x70, 0x6b, 0x03, 0xe7, 0x1a, 0x54, 0x0e, 0x8d, 0xc4, 0x54, 0x98, 0x81, 0x4f, 0xd4, 0x08, 0xd9, 0x02, 0x9e, 0x2e, 0x70, 0xbc, 0xb5, 0xc0, 0x66, 0xd4, 0x52, 0x07, 0x03, 0xd9, 0x0c, 0x5e, 0x08, 0xf7, 0x4a, 0x4a, 0x38, 0xe3, 0x79, 0xb8, 0x1f, 0xb9, 0xd3, 0x09, 0xee, 0x97, 0xe8, 0x11, 0x3c, 0xa4, 0xaf, 0x57, 0x45, 0x9b, 0xd1, 0xc5, 0xcb, 0x5a, 0x94, 0x0b, 0xc6, 0x33, 0xfa, 0x9a, 0x36, 0xe1, 0xa1, 0x1a, 0x0f, 0x8c, 0x6c, 0xee, 0xc7, 0x5a, 0x94, 0x17, 0x26, 0x33, 0x0b, 0x00, 0xb4, 0x13, 0x33, 0xe0, 0xff, 0xba, 0xb0, 0x6b, 0x7c, 0xa3, 0x2f, 0x60, 0xbc, 0xa6, 0x9d, 0x7d, 0xb7, 0xef, 0xbc, 0x22, 0xac, 0x20, 0x74, 0xa9, 0x7f, 0x1b, 0x15, 0xad, 0x25, 0xa3, 0x4d, 0x38, 0xd6, 0xaf, 0xe1, 0xcb, 0x3b, 0x0e, 0x25, 0x9e, 0x0f, 0xf4, 0x39, 0x97, 0x75, 0x87, 0x6f, 0xc9, 0x8f, 0x7e, 0x85, 0x83, 0x37, 0xd2, 0xe8, 0xc1, 0xc6, 0x8b, 0x67, 0x76, 0x7c, 0x04, 0x93, 0xcd, 0x44, 0xdf, 0xfd, 0xf4, 0x0c, 0xf8, 0xcd, 0xe8, 0xb1, 0x3b, 0xfb, 0xd3, 0x85, 0xf7, 0x57, 0xa2, 0xdc, 0x06, 0xcf, 0x7c, 0x63, 0x6d, 0xae, 0x86, 0x78, 0xee, 0xfe, 0xf6, 0xad, 0x65, 0x72, 0x51, 0x10, 0x9e, 0xc7, 0xa2, 0xce, 0x93, 0x9c, 0x72, 0x3d, 0xe2, 0x89, 0x49, 0x91, 0x8a, 0x35, 0xff, 0xfb, 0xcb, 0x3f, 0x19, 0x16, 0x7f, 0x8d, 0x3e, 0xf8, 0xc9, 0xc8, 0x9f, 0x15, 0xa2, 0xcd, 0xe2, 0x1f, 0x86, 0x8d, 0xae, 0x4e, 0xff, 0xee, 0x73, 0xd7, 0x3a, 0x77, 0x3d, 0xe4, 0xae, 0xaf, 0x4e, 0x97, 0xbb, 0x7a, 0x83, 0xaf, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xdd, 0x11, 0x96, 0x45, 0x06, 0x00, 0x00, } var xxx_messageInfo_Key proto.InternalMessageInfo
cloudkey
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/datastore/internal/cloudkey/cloudkey.go
// Copyright 2019 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 cloudpb is a subset of types and functions, copied from cloud.google.com/go/datastore. // // They are copied here to provide compatibility to decode keys generated by the cloud.google.com/go/datastore package. package cloudkey import ( "encoding/base64" "errors" "strings" "github.com/golang/protobuf/proto" cloudpb "google.golang.org/appengine/v2/datastore/internal/cloudpb" ) ///////////////////////////////////////////////////////////////////// // Code below is copied from https://github.com/googleapis/google-cloud-go/blob/master/datastore/datastore.go ///////////////////////////////////////////////////////////////////// var ( // ErrInvalidKey is returned when an invalid key is presented. ErrInvalidKey = errors.New("datastore: invalid key") ) ///////////////////////////////////////////////////////////////////// // Code below is copied from https://github.com/googleapis/google-cloud-go/blob/master/datastore/key.go ///////////////////////////////////////////////////////////////////// // Key represents the datastore key for a stored entity. type Key struct { // Kind cannot be empty. Kind string // Either ID or Name must be zero for the Key to be valid. // If both are zero, the Key is incomplete. ID int64 Name string // Parent must either be a complete Key or nil. Parent *Key // Namespace provides the ability to partition your data for multiple // tenants. In most cases, it is not necessary to specify a namespace. // See docs on datastore multitenancy for details: // https://cloud.google.com/datastore/docs/concepts/multitenancy Namespace string } // DecodeKey decodes a key from the opaque representation returned by Encode. func DecodeKey(encoded string) (*Key, error) { // Re-add padding. if m := len(encoded) % 4; m != 0 { encoded += strings.Repeat("=", 4-m) } b, err := base64.URLEncoding.DecodeString(encoded) if err != nil { return nil, err } pKey := new(cloudpb.Key) if err := proto.Unmarshal(b, pKey); err != nil { return nil, err } return protoToKey(pKey) } // valid returns whether the key is valid. func (k *Key) valid() bool { if k == nil { return false } for ; k != nil; k = k.Parent { if k.Kind == "" { return false } if k.Name != "" && k.ID != 0 { return false } if k.Parent != nil { if k.Parent.Incomplete() { return false } if k.Parent.Namespace != k.Namespace { return false } } } return true } // Incomplete reports whether the key does not refer to a stored entity. func (k *Key) Incomplete() bool { return k.Name == "" && k.ID == 0 } // protoToKey decodes a protocol buffer representation of a key into an // equivalent *Key object. If the key is invalid, protoToKey will return the // invalid key along with ErrInvalidKey. func protoToKey(p *cloudpb.Key) (*Key, error) { var key *Key var namespace string if partition := p.PartitionId; partition != nil { namespace = partition.NamespaceId } for _, el := range p.Path { key = &Key{ Namespace: namespace, Kind: el.Kind, ID: el.GetId(), Name: el.GetName(), Parent: key, } } if !key.valid() { // Also detects key == nil. return key, ErrInvalidKey } return key, nil }
runtime
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/runtime/runtime_test.go
// Copyright 2012 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 runtime import ( "context" "fmt" "net/http" "net/http/httptest" "testing" "time" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal/aetesting" pb "google.golang.org/appengine/v2/internal/system" ) func TestRunInBackgroundSendFirst(t *testing.T) { testRunInBackground(t, true) } func TestRunInBackgroundRecvFirst(t *testing.T) { testRunInBackground(t, false) } func testRunInBackground(t *testing.T, sendFirst bool) { srv := httptest.NewServer(nil) defer srv.Close() const id = "f00bar" sendWait, recvWait := make(chan bool), make(chan bool) sbr := make(chan bool) // strobed when system.StartBackgroundRequest has started calls := 0 c := aetesting.FakeSingleContext(t, "system", "StartBackgroundRequest", func(req *pb.StartBackgroundRequestRequest, res *pb.StartBackgroundRequestResponse) error { calls++ if calls > 1 { t.Errorf("Too many calls to system.StartBackgroundRequest") } sbr <- true res.RequestId = proto.String(id) <-sendWait return nil }) var c2 context.Context // a fake newContext = func(*http.Request) context.Context { return c2 } var fRun int f := func(c3 context.Context) { fRun++ if c3 != c2 { t.Errorf("f got a different context than expected") } } ribErrc := make(chan error) go func() { ribErrc <- RunInBackground(c, f) }() brErrc := make(chan error) go func() { <-sbr req, err := http.NewRequest("GET", srv.URL+"/_ah/background", nil) if err != nil { brErrc <- fmt.Errorf("http.NewRequest: %v", err) return } req.Header.Set("X-AppEngine-BackgroundRequest", id) client := &http.Client{ Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, }, } <-recvWait _, err = client.Do(req) brErrc <- err }() // Send and receive are both waiting at this point. waits := [2]chan bool{sendWait, recvWait} if !sendFirst { waits[0], waits[1] = waits[1], waits[0] } waits[0] <- true time.Sleep(100 * time.Millisecond) waits[1] <- true if err := <-ribErrc; err != nil { t.Fatalf("RunInBackground: %v", err) } if err := <-brErrc; err != nil { t.Fatalf("background request: %v", err) } if fRun != 1 { t.Errorf("Got %d runs of f, want 1", fRun) } }
runtime
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/runtime/runtime.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 runtime exposes information about the resource usage of the application. It also provides a way to run code in a new background context of a module. This package does not work on App Engine "flexible environment". */ package runtime // import "google.golang.org/appengine/v2/runtime" import ( "context" "net/http" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/system" ) // Statistics represents the system's statistics. type Statistics struct { // CPU records the CPU consumed by this instance, in megacycles. CPU struct { Total float64 Rate1M float64 // consumption rate over one minute Rate10M float64 // consumption rate over ten minutes } // RAM records the memory used by the instance, in megabytes. RAM struct { Current float64 Average1M float64 // average usage over one minute Average10M float64 // average usage over ten minutes } } func Stats(c context.Context) (*Statistics, error) { req := &pb.GetSystemStatsRequest{} res := &pb.GetSystemStatsResponse{} if err := internal.Call(c, "system", "GetSystemStats", req, res); err != nil { return nil, err } s := &Statistics{} if res.Cpu != nil { s.CPU.Total = res.Cpu.GetTotal() s.CPU.Rate1M = res.Cpu.GetRate1M() s.CPU.Rate10M = res.Cpu.GetRate10M() } if res.Memory != nil { s.RAM.Current = res.Memory.GetCurrent() s.RAM.Average1M = res.Memory.GetAverage1M() s.RAM.Average10M = res.Memory.GetAverage10M() } return s, nil } /* RunInBackground makes an API call that triggers an /_ah/background request. There are two independent code paths that need to make contact: the RunInBackground code, and the /_ah/background handler. The matchmaker loop arranges for the two paths to meet. The RunInBackground code passes a send to the matchmaker, the /_ah/background passes a recv to the matchmaker, and the matchmaker hooks them up. */ func init() { http.HandleFunc("/_ah/background", handleBackground) sc := make(chan send) rc := make(chan recv) sendc, recvc = sc, rc go matchmaker(sc, rc) } var ( sendc chan<- send // RunInBackground sends to this recvc chan<- recv // handleBackground sends to this ) type send struct { id string f func(context.Context) } type recv struct { id string ch chan<- func(context.Context) } func matchmaker(sendc <-chan send, recvc <-chan recv) { // When one side of the match arrives before the other // it is inserted in the corresponding map. waitSend := make(map[string]send) waitRecv := make(map[string]recv) for { select { case s := <-sendc: if r, ok := waitRecv[s.id]; ok { // meet! delete(waitRecv, s.id) r.ch <- s.f } else { // waiting for r waitSend[s.id] = s } case r := <-recvc: if s, ok := waitSend[r.id]; ok { // meet! delete(waitSend, r.id) r.ch <- s.f } else { // waiting for s waitRecv[r.id] = r } } } } var newContext = appengine.NewContext // for testing func handleBackground(w http.ResponseWriter, req *http.Request) { id := req.Header.Get("X-AppEngine-BackgroundRequest") ch := make(chan func(context.Context)) recvc <- recv{id, ch} (<-ch)(newContext(req)) } // RunInBackground runs f in a background goroutine in this process. // f is provided a context that may outlast the context provided to RunInBackground. // This is only valid to invoke from a service set to basic or manual scaling. func RunInBackground(c context.Context, f func(c context.Context)) error { req := &pb.StartBackgroundRequestRequest{} res := &pb.StartBackgroundRequestResponse{} if err := internal.Call(c, "system", "StartBackgroundRequest", req, res); err != nil { return err } sendc <- send{res.GetRequestId(), f} return nil } func init() { internal.RegisterErrorCodeMap("system", pb.SystemServiceError_ErrorCode_name) }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/log.go
// Copyright 2021 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 ( "encoding/json" "fmt" "regexp" "strings" ) var ( logLevelName = map[int64]string{ 0: "DEBUG", 1: "INFO", 2: "WARNING", 3: "ERROR", 4: "CRITICAL", } traceContextRe = regexp.MustCompile(`^(\w+)/(\d+)(?:;o=[01])?$`) // maxLogMessage is the largest message that will be logged without chunking, reserving room for prefixes. // See http://cloud/logging/quotas#log-limits maxLogMessage = 255000 ) func logf(c *aeContext, level int64, format string, args ...interface{}) { if c == nil { panic("not an App Engine aeContext") } if !IsStandard() { s := strings.TrimRight(fmt.Sprintf(format, args...), "\n") now := timeNow().UTC() timestamp := fmt.Sprintf("%d/%02d/%02d %02d:%02d:%02d", now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second()) fmt.Fprintf(logStream, "%s %s: %s\n", timestamp, logLevelName[level], s) return } eol := func(s string) string { if strings.HasSuffix(s, "\n") { return "" } return "\n" } msg := fmt.Sprintf(format, args...) if strings.HasPrefix(msg, "{") { // Assume the message is already structured, leave as-is unless it is too long. // Note: chunking destroys the structure; developers will have to ensure their structured log // is small enough to fit in a single message. for _, m := range chunkLog(msg) { fmt.Fprint(logStream, m, eol(m)) } return } // First chunk the message, then structure each chunk. traceID, spanID := traceAndSpan(c) for _, m := range chunkLog(msg) { sl := structuredLog{ Message: m, Severity: logLevelName[level], TraceID: traceID, SpanID: spanID, } if b, err := json.Marshal(sl); err != nil { // Write raw message if error. fmt.Fprint(logStream, m, eol(m)) } else { s := string(b) fmt.Fprint(logStream, s, eol(s)) } } } type structuredLog struct { Message string `json:"message"` Severity string `json:"severity"` TraceID string `json:"logging.googleapis.com/trace,omitempty"` SpanID string `json:"logging.googleapis.com/spanId,omitempty"` } func chunkLog(msg string) []string { if len(msg) <= maxLogMessage { return []string{msg} } var chunks []string i := 0 for { if i == len(msg) { break } if i+maxLogMessage > len(msg) { chunks = append(chunks, msg[i:]) break } chunks = append(chunks, msg[i:i+maxLogMessage]) i += maxLogMessage } for i, c := range chunks { chunks[i] = fmt.Sprintf("Part %d/%d: ", i+1, len(chunks)) + c } return chunks } func traceAndSpan(c *aeContext) (string, string) { headers := c.req.Header["X-Cloud-Trace-Context"] if len(headers) < 1 { return "", "" } matches := traceContextRe.FindAllStringSubmatch(headers[0], -1) if len(matches) < 1 || len(matches[0]) < 3 { return "", "" } traceID := matches[0][1] spanID := matches[0][2] projectID := projectID() return fmt.Sprintf("projects/%s/traces/%s", projectID, traceID), spanID }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/main_test.go
package internal import ( "go/build" "path/filepath" "testing" ) func TestFindMainPath(t *testing.T) { // Tests won't have package main, instead they have testing.tRunner want := filepath.Join(build.Default.GOROOT, "src", "testing", "testing.go") got := findMainPath() if want != got { t.Errorf("findMainPath: want %s, got %s", want, got) } }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/internal_vm_test.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 import ( "io" "io/ioutil" "net/http" "net/http/httptest" "testing" ) func TestInstallingHealthChecker(t *testing.T) { try := func(desc string, mux *http.ServeMux, wantCode int, wantBody string) { installHealthChecker(mux) srv := httptest.NewServer(mux) defer srv.Close() resp, err := http.Get(srv.URL + "/_ah/health") if err != nil { t.Errorf("%s: http.Get: %v", desc, err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { t.Errorf("%s: reading body: %v", desc, err) return } if resp.StatusCode != wantCode { t.Errorf("%s: got HTTP %d, want %d", desc, resp.StatusCode, wantCode) return } if wantBody != "" && string(body) != wantBody { t.Errorf("%s: got HTTP body %q, want %q", desc, body, wantBody) return } } // If there's no handlers, or only a root handler, a health checker should be installed. try("empty mux", http.NewServeMux(), 200, "ok") mux := http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "root handler") }) try("mux with root handler", mux, 200, "ok") // If there's a custom health check handler, one should not be installed. mux = http.NewServeMux() mux.HandleFunc("/_ah/health", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(418) io.WriteString(w, "I'm short and stout!") }) try("mux with custom health checker", mux, 418, "I'm short and stout!") }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/app_id_test.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 ( "testing" ) func TestAppIDParsing(t *testing.T) { testCases := []struct { in string partition, domain, displayID string }{ {"simple-app-id", "", "", "simple-app-id"}, {"domain.com:domain-app-id", "", "domain.com", "domain-app-id"}, {"part~partition-app-id", "part", "", "partition-app-id"}, {"part~domain.com:display", "part", "domain.com", "display"}, } for _, tc := range testCases { part, dom, dis := parseFullAppID(tc.in) if part != tc.partition { t.Errorf("partition of %q: got %q, want %q", tc.in, part, tc.partition) } if dom != tc.domain { t.Errorf("domain of %q: got %q, want %q", tc.in, dom, tc.domain) } if dis != tc.displayID { t.Errorf("displayID of %q: got %q, want %q", tc.in, dis, tc.displayID) } } }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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 }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/api_test.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 import ( "bufio" "bytes" "context" "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" "net/url" "os" "os/exec" "strings" "sync/atomic" "testing" "time" "github.com/golang/protobuf/proto" basepb "google.golang.org/appengine/v2/internal/base" remotepb "google.golang.org/appengine/v2/internal/remote_api" ) const testTicketHeader = "X-Magic-Ticket-Header" func init() { ticketHeader = testTicketHeader } type fakeAPIHandler struct { hang chan int // used for RunSlowly RPC LogFlushes int32 // atomic allowMissingTicket bool } func (f *fakeAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { writeResponse := func(res *remotepb.Response) { hresBody, err := proto.Marshal(res) if err != nil { http.Error(w, fmt.Sprintf("Failed encoding API response: %v", err), 500) return } w.Write(hresBody) } if r.URL.Path != "/rpc_http" { http.NotFound(w, r) return } hreqBody, err := ioutil.ReadAll(r.Body) if err != nil { http.Error(w, fmt.Sprintf("Bad body: %v", err), 500) return } apiReq := &remotepb.Request{} if err := proto.Unmarshal(hreqBody, apiReq); err != nil { http.Error(w, fmt.Sprintf("Bad encoded API request: %v", err), 500) return } if *apiReq.RequestId != "s3cr3t" && !f.allowMissingTicket { writeResponse(&remotepb.Response{ RpcError: &remotepb.RpcError{ Code: proto.Int32(int32(remotepb.RpcError_SECURITY_VIOLATION)), Detail: proto.String("bad security ticket"), }, }) return } if got, want := r.Header.Get(dapperHeader), "trace-001"; got != want { writeResponse(&remotepb.Response{ RpcError: &remotepb.RpcError{ Code: proto.Int32(int32(remotepb.RpcError_BAD_REQUEST)), Detail: proto.String(fmt.Sprintf("trace info = %q, want %q", got, want)), }, }) return } service, method := *apiReq.ServiceName, *apiReq.Method var resOut proto.Message if service == "actordb" && method == "LookupActor" { req := &basepb.StringProto{} res := &basepb.StringProto{} if err := proto.Unmarshal(apiReq.Request, req); err != nil { http.Error(w, fmt.Sprintf("Bad encoded request: %v", err), 500) return } if *req.Value == "Doctor Who" { res.Value = proto.String("David Tennant") } resOut = res } if service == "errors" { switch method { case "Non200": http.Error(w, "I'm a little teapot.", 418) return case "ShortResponse": w.Header().Set("Content-Length", "100") w.Write([]byte("way too short")) return case "OverQuota": writeResponse(&remotepb.Response{ RpcError: &remotepb.RpcError{ Code: proto.Int32(int32(remotepb.RpcError_OVER_QUOTA)), Detail: proto.String("you are hogging the resources!"), }, }) return case "RunSlowly": // TestAPICallRPCFailure creates f.hang, but does not strobe it // until Call returns with remotepb.RpcError_CANCELLED. // This is here to force a happens-before relationship between // the httptest server handler and shutdown. <-f.hang resOut = &basepb.VoidProto{} } } if service == "logservice" && method == "Flush" { // Pretend log flushing is slow. time.Sleep(50 * time.Millisecond) atomic.AddInt32(&f.LogFlushes, 1) resOut = &basepb.VoidProto{} } encOut, err := proto.Marshal(resOut) if err != nil { http.Error(w, fmt.Sprintf("Failed encoding response: %v", err), 500) return } writeResponse(&remotepb.Response{ Response: encOut, }) } func makeTestRequest(apiURL *url.URL) *http.Request { req := &http.Request{ Header: http.Header{ ticketHeader: []string{"s3cr3t"}, dapperHeader: []string{"trace-001"}, }, } return RegisterTestRequest(req, apiURL, "") } func setup() (f *fakeAPIHandler, r *http.Request, cleanup func()) { f = &fakeAPIHandler{} srv := httptest.NewServer(f) apiURL, err := url.Parse(srv.URL + apiPath) if err != nil { panic(fmt.Sprintf("url.Parse(%q): %v", srv.URL+apiPath, err)) } return f, makeTestRequest(apiURL), srv.Close } func TestAPICall(t *testing.T) { _, r, cleanup := setup() defer cleanup() req := &basepb.StringProto{ Value: proto.String("Doctor Who"), } res := &basepb.StringProto{} err := Call(r.Context(), "actordb", "LookupActor", req, res) if err != nil { t.Fatalf("API call failed: %v", err) } if got, want := *res.Value, "David Tennant"; got != want { t.Errorf("Response is %q, want %q", got, want) } } func TestAPICallTicketUnavailable(t *testing.T) { f, r, cleanup := setup() defer cleanup() f.allowMissingTicket = true r.Header.Set(ticketHeader, "") req := &basepb.StringProto{ Value: proto.String("Doctor Who"), } res := &basepb.StringProto{} err := Call(r.Context(), "actordb", "LookupActor", req, res) if err != nil { t.Fatalf("API call failed: %v", err) } if got, want := *res.Value, "David Tennant"; got != want { t.Errorf("Response is %q, want %q", got, want) } } func TestAPICallRPCFailure(t *testing.T) { f, r, cleanup := setup() defer cleanup() testCases := []struct { method string code remotepb.RpcError_ErrorCode }{ {"Non200", remotepb.RpcError_UNKNOWN}, {"ShortResponse", remotepb.RpcError_UNKNOWN}, {"OverQuota", remotepb.RpcError_OVER_QUOTA}, {"RunSlowly", remotepb.RpcError_CANCELLED}, } f.hang = make(chan int) // only for RunSlowly for _, tc := range testCases { ctx, _ := context.WithTimeout(r.Context(), 300*time.Millisecond) err := Call(ctx, "errors", tc.method, &basepb.VoidProto{}, &basepb.VoidProto{}) ce, ok := err.(*CallError) if !ok { t.Errorf("%s: API call error is %T (%v), want *CallError", tc.method, err, err) continue } if ce.Code != int32(tc.code) { t.Errorf("%s: ce.Code = %d, want %d", tc.method, ce.Code, tc.code) } if tc.method == "RunSlowly" { f.hang <- 1 // release the HTTP handler } } } func TestAPICallDialFailure(t *testing.T) { // we intentially don't set up the fakeAPIHandler for this test to cause the dail failure start := time.Now() err := Call(context.Background(), "foo", "bar", &basepb.VoidProto{}, &basepb.VoidProto{}) const max = 1 * time.Second if taken := time.Since(start); taken > max { t.Errorf("Dial hang took too long: %v > %v", taken, max) } if err == nil { t.Error("Call did not fail") } } func TestRemoteAddr(t *testing.T) { var addr string http.HandleFunc("/remote_addr", func(w http.ResponseWriter, r *http.Request) { addr = r.RemoteAddr }) testCases := []struct { headers http.Header addr string }{ {http.Header{"X-Appengine-User-Ip": []string{"10.5.2.1"}}, "10.5.2.1:80"}, {http.Header{"X-Appengine-Remote-Addr": []string{"1.2.3.4"}}, "1.2.3.4:80"}, {http.Header{"X-Appengine-Remote-Addr": []string{"1.2.3.4:8080"}}, "1.2.3.4:8080"}, { http.Header{"X-Appengine-Remote-Addr": []string{"2401:fa00:9:1:7646:a0ff:fe90:ca66"}}, "[2401:fa00:9:1:7646:a0ff:fe90:ca66]:80", }, { http.Header{"X-Appengine-Remote-Addr": []string{"[::1]:http"}}, "[::1]:http", }, {http.Header{}, "127.0.0.1:80"}, } for _, tc := range testCases { r := &http.Request{ Method: "GET", URL: &url.URL{Scheme: "http", Path: "/remote_addr"}, Header: tc.headers, Body: ioutil.NopCloser(bytes.NewReader(nil)), } Middleware(http.DefaultServeMux).ServeHTTP(httptest.NewRecorder(), r) if addr != tc.addr { t.Errorf("Header %v, got %q, want %q", tc.headers, addr, tc.addr) } } } func TestPanickingHandler(t *testing.T) { http.HandleFunc("/panic", func(http.ResponseWriter, *http.Request) { panic("whoops!") }) r := &http.Request{ Method: "GET", URL: &url.URL{Scheme: "http", Path: "/panic"}, Body: ioutil.NopCloser(bytes.NewReader(nil)), } rec := httptest.NewRecorder() Middleware(http.DefaultServeMux).ServeHTTP(rec, r) if rec.Code != 500 { t.Errorf("Panicking handler returned HTTP %d, want HTTP %d", rec.Code, 500) } } var raceDetector = false func TestAPICallAllocations(t *testing.T) { if raceDetector { t.Skip("not running under race detector") } // Run the test API server in a subprocess so we aren't counting its allocations. apiURL, cleanup := launchHelperProcess(t) defer cleanup() r := makeTestRequest(apiURL) req := &basepb.StringProto{ Value: proto.String("Doctor Who"), } res := &basepb.StringProto{} var apiErr error avg := testing.AllocsPerRun(100, func() { ctx, _ := context.WithTimeout(r.Context(), 100*time.Millisecond) if err := Call(ctx, "actordb", "LookupActor", req, res); err != nil && apiErr == nil { apiErr = err // get the first error only } }) if apiErr != nil { t.Errorf("API call failed: %v", apiErr) } // Lots of room for improvement... const min, max float64 = 60, 86 if avg < min || max < avg { t.Errorf("Allocations per API call = %g, want in [%g,%g]", avg, min, max) } } func launchHelperProcess(t *testing.T) (apiURL *url.URL, cleanup func()) { cmd := exec.Command(os.Args[0], "-test.run=TestHelperProcess") cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} stdin, err := cmd.StdinPipe() if err != nil { t.Fatalf("StdinPipe: %v", err) } stdout, err := cmd.StdoutPipe() if err != nil { t.Fatalf("StdoutPipe: %v", err) } if err := cmd.Start(); err != nil { t.Fatalf("Starting helper process: %v", err) } scan := bufio.NewScanner(stdout) var u *url.URL for scan.Scan() { line := scan.Text() if hp := strings.TrimPrefix(line, helperProcessMagic); hp != line { var err error u, err = url.Parse(hp) if err != nil { t.Fatalf("Failed to parse %q: %v", hp, err) } break } } if err := scan.Err(); err != nil { t.Fatalf("Scanning helper process stdout: %v", err) } if u == nil { t.Fatal("Helper process never reported") } return u, func() { stdin.Close() if err := cmd.Wait(); err != nil { t.Errorf("Helper process did not exit cleanly: %v", err) } } } const helperProcessMagic = "A lovely helper process is listening at " // This isn't a real test. It's used as a helper process. func TestHelperProcess(*testing.T) { if os.Getenv("GO_WANT_HELPER_PROCESS") != "1" { return } defer os.Exit(0) f := &fakeAPIHandler{} srv := httptest.NewServer(f) defer srv.Close() fmt.Println(helperProcessMagic + srv.URL + apiPath) // Wait for stdin to be closed. io.Copy(ioutil.Discard, os.Stdin) }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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 ( "context" "errors" "os" "github.com/golang/protobuf/proto" ) type ctxKey string func (c ctxKey) String() string { return "appengine aeContext key: " + string(c) } var errNotAppEngineContext = errors.New("not an App Engine aeContext") type CallOverrideFunc func(ctx context.Context, service, method string, in, out proto.Message) error var callOverrideKey = "holds []CallOverrideFunc" func WithCallOverride(ctx context.Context, f CallOverrideFunc) context.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 context.WithValue(ctx, &callOverrideKey, cofs) } func callOverrideFromContext(ctx context.Context) (CallOverrideFunc, context.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 // aeContext that will hide it. f := cofs[len(cofs)-1] ctx = context.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 context.Context, f logOverrideFunc) context.Context { return context.WithValue(ctx, &logOverrideKey, f) } var appIDOverrideKey = "holds a string, being the full app ID" func WithAppIDOverride(ctx context.Context, appID string) context.Context { return context.WithValue(ctx, &appIDOverrideKey, appID) } var apiHostOverrideKey = ctxKey("holds a string, being the alternate API_HOST") func withAPIHostOverride(ctx context.Context, apiHost string) context.Context { return context.WithValue(ctx, apiHostOverrideKey, apiHost) } var apiPortOverrideKey = ctxKey("holds a string, being the alternate API_PORT") func withAPIPortOverride(ctx context.Context, apiPort string) context.Context { return context.WithValue(ctx, apiPortOverrideKey, apiPort) } var namespaceKey = "holds the namespace string" func withNamespace(ctx context.Context, ns string) context.Context { return context.WithValue(ctx, &namespaceKey, ns) } func NamespaceFromContext(ctx context.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 context.Context) string { if id, ok := ctx.Value(&appIDOverrideKey).(string); ok { return id } return fullyQualifiedAppID(ctx) } func Logf(ctx context.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 context.Context, namespace string) context.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) } } }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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 ( "context" "log" "net/http" "os" "strings" ) // 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" ) var ( // 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 context.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 { return IsSecondGen() } // IsSecondGen 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() } func ctxHeaders(ctx context.Context) http.Header { c := fromContext(ctx) if c == nil { return nil } return c.Request().Header } func DefaultVersionHostname(ctx context.Context) string { return ctxHeaders(ctx).Get(hDefaultVersionHostname) } func RequestID(ctx context.Context) string { return ctxHeaders(ctx).Get(hRequestLogId) } func Datacenter(ctx context.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(_ context.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(_ context.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 } return projectID() } func projectID() string { if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" { return project } return string(mustGetMetadata("instance/attributes/gae_project")) } func fullyQualifiedAppID(_ context.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") != "" || os.Getenv("GAE_ENV") == "localdev" }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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/v2/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))
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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 ( "context" "errors" "reflect" "github.com/golang/protobuf/proto" basepb "google.golang.org/appengine/v2/internal/base" pb "google.golang.org/appengine/v2/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 context.Context) *transaction { t, _ := ctx.Value(&transactionKey).(*transaction) return t } func withTransaction(ctx context.Context, t *transaction) context.Context { return context.WithValue(ctx, &transactionKey, t) } type transaction struct { transaction pb.Transaction finished bool } var ErrConcurrentTransaction = errors.New("internal: concurrent transaction") func RunTransactionOnce(c context.Context, f func(context.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 }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/log_test.go
// Copyright 2021 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 ( "bytes" "encoding/json" "fmt" "io" "net/http" "os" "reflect" "testing" "time" ) func TestLogf(t *testing.T) { testCases := []struct { name string deployed bool level int64 format string header string args []interface{} maxLogMessage int want string wantJSON bool }{ { name: "local-debug", level: 0, format: "my %s %d", args: []interface{}{"abc", 1}, want: "2021/05/12 16:09:52 DEBUG: my abc 1\n", }, { name: "local-info", level: 1, format: "my %s %d", args: []interface{}{"abc", 1}, want: "2021/05/12 16:09:52 INFO: my abc 1\n", }, { name: "local-warning", level: 2, format: "my %s %d", args: []interface{}{"abc", 1}, want: "2021/05/12 16:09:52 WARNING: my abc 1\n", }, { name: "local-error", level: 3, format: "my %s %d", args: []interface{}{"abc", 1}, want: "2021/05/12 16:09:52 ERROR: my abc 1\n", }, { name: "local-critical", level: 4, format: "my %s %d", args: []interface{}{"abc", 1}, want: "2021/05/12 16:09:52 CRITICAL: my abc 1\n", }, { name: "local-multiline", level: 0, format: "my \n multiline\n\n", want: "2021/05/12 16:09:52 DEBUG: my \n multiline\n", }, { name: "local-long-lines-not-split", maxLogMessage: 10, format: "0123456789a123", want: "2021/05/12 16:09:52 DEBUG: 0123456789a123\n", }, { name: "deployed-plain-debug", deployed: true, level: 0, format: "my %s %d", args: []interface{}{"abc", 1}, want: `{"message":"my abc 1","severity":"DEBUG"}` + "\n", wantJSON: true, }, { name: "deployed-plain-info", deployed: true, level: 1, format: "my %s %d", args: []interface{}{"abc", 1}, want: `{"message":"my abc 1","severity":"INFO"}` + "\n", wantJSON: true, }, { name: "deployed-plain-warning", deployed: true, level: 2, format: "my %s %d", args: []interface{}{"abc", 1}, want: `{"message":"my abc 1","severity":"WARNING"}` + "\n", wantJSON: true, }, { name: "deployed-plain-error", deployed: true, level: 3, format: "my %s %d", args: []interface{}{"abc", 1}, want: `{"message":"my abc 1","severity":"ERROR"}` + "\n", wantJSON: true, }, { name: "deployed-plain-critical", deployed: true, level: 4, format: "my %s %d", args: []interface{}{"abc", 1}, want: `{"message":"my abc 1","severity":"CRITICAL"}` + "\n", wantJSON: true, }, { name: "deployed-plain-multiline", deployed: true, level: 0, format: "my \n multiline\n\n", want: "{\"message\":\"my \\n multiline\\n\\n\",\"severity\":\"DEBUG\"}\n", wantJSON: true, }, { name: "deployed-plain-megaquote", deployed: true, level: 0, format: `my "megaquote" %q`, args: []interface{}{`internal "quote"`}, want: "{\"message\":\"my \\\"megaquote\\\" \\\"internal \\\\\\\"quote\\\\\\\"\\\"\",\"severity\":\"DEBUG\"}\n", wantJSON: true, }, { name: "deployed-too-long", deployed: true, format: "0123456789a123", maxLogMessage: 10, want: "{\"message\":\"Part 1/2: 0123456789\",\"severity\":\"DEBUG\"}\n{\"message\":\"Part 2/2: a123\",\"severity\":\"DEBUG\"}\n", }, { name: "deployed-with-trace-header", deployed: true, format: "my message", header: "abc123/1234", want: "{\"message\":\"my message\",\"severity\":\"DEBUG\",\"logging.googleapis.com/trace\":\"projects/my-project/traces/abc123\",\"logging.googleapis.com/spanId\":\"1234\"}\n", }, { name: "deployed-structured-debug", deployed: true, level: 0, format: `{"some": "message %s %d"}`, args: []interface{}{"abc", 1}, want: `{"some": "message abc 1"}` + "\n", }, { name: "deployed-structured-info", deployed: true, level: 1, format: `{"some": "message %s %d"}`, args: []interface{}{"abc", 1}, want: `{"some": "message abc 1"}` + "\n", }, { name: "deployed-structured-warning", deployed: true, level: 2, format: `{"some": "message %s %d"}`, args: []interface{}{"abc", 1}, want: `{"some": "message abc 1"}` + "\n", }, { name: "deployed-structured-error", deployed: true, level: 3, format: `{"some": "message %s %d"}`, args: []interface{}{"abc", 1}, want: `{"some": "message abc 1"}` + "\n", }, { name: "deployed-structured-critical", deployed: true, level: 4, format: `{"some": "message %s %d"}`, args: []interface{}{"abc", 1}, want: `{"some": "message abc 1"}` + "\n", }, { // The leading "{" assumes this is already a structured log, so no alteration is performed. name: "deployed-structured-multiline", deployed: true, level: 4, // This is not even valid JSON; we don't attempt to validate and only use the first character. format: "{\"some\": \"message\n%s %d\"", args: []interface{}{"abc", 1}, want: "{\"some\": \"message\nabc 1\"\n", }, { name: "deployed-structured-too-long", deployed: true, format: `{"message": "abc", "severity": "DEBUG"}`, maxLogMessage: 25, // User-structured logs must manually chunk; here we can see the structured message is (knowingly) broken. want: "Part 1/2: {\"message\": \"abc\", \"sever\nPart 2/2: ity\": \"DEBUG\"}\n", }, { name: "deployed-structured-with-trace-header", deployed: true, format: `{"message": "abc", "severity": "DEBUG"}`, header: "abc123/1234", want: "{\"message\": \"abc\", \"severity\": \"DEBUG\"}\n", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { env := "" if tc.deployed { env = "standard" } defer setEnvVar(t, "GAE_ENV", env)() defer setEnvVar(t, "GOOGLE_CLOUD_PROJECT", "my-project")() var buf bytes.Buffer defer overrideLogStream(t, &buf)() defer overrideTimeNow(t, time.Date(2021, 5, 12, 16, 9, 52, 0, time.UTC))() if tc.maxLogMessage > 0 { defer overrideMaxLogMessage(t, tc.maxLogMessage)() } var headers []string if tc.header != "" { headers = []string{tc.header} } c := buildContextWithTraceHeaders(t, headers) logf(c, tc.level, tc.format, tc.args...) if got, want := buf.String(), tc.want; got != want { t.Errorf("incorrect log got=%q want=%q", got, want) } if tc.wantJSON { var e struct { Message string `json:"message"` Severity string `json:"severity"` } if err := json.Unmarshal(buf.Bytes(), &e); err != nil { t.Fatalf("invalid JSON: %v", err) } if gotMsg, wantMsg := e.Message, fmt.Sprintf(tc.format, tc.args...); gotMsg != wantMsg { t.Errorf("JSON-encoded message incorrect got=%q want=%q", gotMsg, wantMsg) } if gotSev, wantSev := e.Severity, logLevelName[tc.level]; gotSev != wantSev { t.Errorf("JSON-encoded severity incorrect got=%q want=%q", gotSev, wantSev) } } }) } } func TestChunkLog(t *testing.T) { testCases := []struct { name string msg string want []string }{ { name: "empty", msg: "", want: []string{""}, }, { name: "short", msg: "short msg", want: []string{"short msg"}, }, { name: "exactly max", msg: "0123456789", want: []string{"0123456789"}, }, { name: "too long", msg: "0123456789a123", want: []string{ "Part 1/2: 0123456789", "Part 2/2: a123", }, }, { name: "too long exactly max", msg: "0123456789a123456789", want: []string{ "Part 1/2: 0123456789", "Part 2/2: a123456789", }, }, { name: "longer", msg: "0123456789a123456789b123456789c", want: []string{ "Part 1/4: 0123456789", "Part 2/4: a123456789", "Part 3/4: b123456789", "Part 4/4: c", }, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { defer overrideMaxLogMessage(t, 10)() got := chunkLog(tc.msg) if !reflect.DeepEqual(got, tc.want) { t.Errorf("chunkLog() got=%q want=%q", got, tc.want) } }) } } func TestTraceAndSpan(t *testing.T) { testCases := []struct { name string header []string wantTraceID string wantSpanID string }{ { name: "empty", }, { name: "header present, but empty", header: []string{""}, }, { name: "trace and span", header: []string{"abc1234/456"}, wantTraceID: "projects/my-project/traces/abc1234", wantSpanID: "456", }, { name: "trace and span with suffix", header: []string{"abc1234/456;o=0"}, wantTraceID: "projects/my-project/traces/abc1234", wantSpanID: "456", }, { name: "multiple headers, first taken", header: []string{ "abc1234/456;o=1", "zzzzzzz/999;o=0", }, wantTraceID: "projects/my-project/traces/abc1234", wantSpanID: "456", }, { name: "missing trace", header: []string{"/456"}, }, { name: "missing span", header: []string{"abc1234/"}, }, { name: "random", header: []string{"somestring"}, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { defer setEnvVar(t, "GOOGLE_CLOUD_PROJECT", "my-project")() c := buildContextWithTraceHeaders(t, tc.header) gotTraceID, gotSpanID := traceAndSpan(c) if got, want := gotTraceID, tc.wantTraceID; got != want { t.Errorf("Incorrect traceID got=%q want=%q", got, want) } if got, want := gotSpanID, tc.wantSpanID; got != want { t.Errorf("Incorrect spanID got=%q want=%q", got, want) } }) } } func setEnvVar(t *testing.T, key, value string) func() { t.Helper() old, present := os.LookupEnv(key) if err := os.Setenv(key, value); err != nil { t.Fatal(err) } return func() { if present { if err := os.Setenv(key, old); err != nil { t.Fatal(err) } if err := os.Unsetenv(key); err != nil { t.Fatal(err) } } } } func overrideLogStream(t *testing.T, writer io.Writer) func() { t.Helper() old := logStream logStream = writer return func() { logStream = old } } func overrideTimeNow(t *testing.T, now time.Time) func() { t.Helper() old := timeNow timeNow = func() time.Time { return now } return func() { timeNow = old } } func overrideMaxLogMessage(t *testing.T, max int) func() { t.Helper() old := maxLogMessage maxLogMessage = max return func() { maxLogMessage = old } } func buildContextWithTraceHeaders(t *testing.T, headers []string) *aeContext { t.Helper() req, err := http.NewRequest("GET", "/", nil) if err != nil { t.Fatal(err) } for _, h := range headers { req.Header.Add("X-Cloud-Trace-Context", h) } return fromContext(ContextForTesting(req)) }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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) }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/api_race_test.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. //go:build race // +build race package internal func init() { raceDetector = true }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/identity_test.go
package internal import ( "os" "testing" ) func TestIsDevAppServer(t *testing.T) { tests := []struct { desc string // See http://go/gotip/episodes/25 for naming guidance. env map[string]string want bool }{ {desc: "empty", env: map[string]string{}, want: false}, {desc: "legacy", env: map[string]string{"RUN_WITH_DEVAPPSERVER": "1"}, want: true}, {desc: "new", env: map[string]string{"GAE_ENV": "localdev"}, want: true}, } for _, test := range tests { t.Run(test.desc, func(t *testing.T) { for key, value := range test.env { defer setenv(t, key, value)() } if got := IsDevAppServer(); got != test.want { t.Errorf("env=%v IsDevAppServer() got %v, want %v", test.env, got, test.want) } }) } } // setenv is a backport of https://pkg.go.dev/testing#T.Setenv func setenv(t *testing.T, key, value string) func() { t.Helper() prevValue, ok := os.LookupEnv(key) if err := os.Setenv(key, value); err != nil { t.Fatalf("cannot set environment variable: %v", err) } if ok { return func() { os.Setenv(key, prevValue) } } return func() { os.Unsetenv(key) } }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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. package internal import ( "io" "log" "net/http" "net/url" "os" "path/filepath" "runtime" ) // MainPath stores the file path of the main package. var MainPath string 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, Middleware(http.DefaultServeMux)); 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") }) } }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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. //go:build appenginevm // +build appenginevm package internal func init() { appengineFlex = true }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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() }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/net_test.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 import ( "context" "sync" "testing" "time" basepb "google.golang.org/appengine/v2/internal/base" ) func TestDialLimit(t *testing.T) { // Fill up semaphore with false acquisitions to permit only two TCP connections at a time. // We don't replace limitSem because that results in a data race when net/http lazily closes connections. nFake := cap(limitSem) - 2 for i := 0; i < nFake; i++ { limitSem <- 1 } defer func() { for i := 0; i < nFake; i++ { <-limitSem } }() f, r, cleanup := setup() // setup is in api_test.go defer cleanup() f.hang = make(chan int) // If we make two RunSlowly RPCs (which will wait for f.hang to be strobed), // then the simple Non200 RPC should hang. var wg sync.WaitGroup wg.Add(2) for i := 0; i < 2; i++ { go func() { defer wg.Done() Call(r.Context(), "errors", "RunSlowly", &basepb.VoidProto{}, &basepb.VoidProto{}) }() } time.Sleep(50 * time.Millisecond) // let those two RPCs start ctx, _ := context.WithTimeout(r.Context(), 50*time.Millisecond) err := Call(ctx, "errors", "Non200", &basepb.VoidProto{}, &basepb.VoidProto{}) if err != errTimeout { t.Errorf("Non200 RPC returned with err %v, want errTimeout", err) } // Drain the two RunSlowly calls. f.hang <- 1 f.hang <- 1 wg.Wait() }
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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. package internal import ( "bytes" "context" "errors" "fmt" "io" "io/ioutil" "net" "net/http" "net/url" "os" "runtime" "strconv" "sync/atomic" "time" "github.com/golang/protobuf/proto" remotepb "google.golang.org/appengine/v2/internal/remote_api" ) const ( apiPath = "/rpc_http" ) 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, }, } logStream io.Writer = os.Stderr // For test hooks. timeNow func() time.Time = time.Now // For test hooks. ) func apiURL(ctx context.Context) *url.URL { host, port := "appengine.googleapis.internal", "10001" if h := os.Getenv("API_HOST"); h != "" { host = h } if hostOverride := ctx.Value(apiHostOverrideKey); hostOverride != nil { host = hostOverride.(string) } if p := os.Getenv("API_PORT"); p != "" { port = p } if portOverride := ctx.Value(apiPortOverrideKey); portOverride != nil { port = portOverride.(string) } return &url.URL{ Scheme: "http", Host: host + ":" + port, Path: apiPath, } } // Middleware wraps an http handler so that it can make GAE API calls func Middleware(next http.Handler) http.Handler { return handleHTTPMiddleware(executeRequestSafelyMiddleware(next)) } func handleHTTPMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { c := &aeContext{ req: r, outHeader: w.Header(), } r = r.WithContext(withContext(r.Context(), c)) c.req = r // 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") } next.ServeHTTP(c, r) c.outHeader = nil // make sure header changes aren't respected any more // 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) } }) } func executeRequestSafelyMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { defer func() { if x := recover(); x != nil { c := w.(*aeContext) logf(c, 4, "%s", renderPanic(x)) // 4 == critical c.outCode = 500 } }() next.ServeHTTP(w, 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) } // aeContext represents the context of an in-flight HTTP request. // It implements the appengine.Context and http.ResponseWriter interfaces. type aeContext struct { req *http.Request outCode int outHeader http.Header outBody []byte } 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 context.Context valuesOnly context.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 context.Context) *aeContext { c, _ := ctx.Value(&contextKey).(*aeContext) return c } func withContext(parent context.Context, c *aeContext) context.Context { ctx := context.WithValue(parent, &contextKey, c) if ns := c.req.Header.Get(curNamespaceHeader); ns != "" { ctx = withNamespace(ctx, ns) } return ctx } func toContext(c *aeContext) context.Context { return withContext(context.Background(), c) } func IncomingHeaders(ctx context.Context) http.Header { if c := fromContext(ctx); c != nil { return c.req.Header } return nil } func ReqContext(req *http.Request) context.Context { return req.Context() } func WithContext(parent context.Context, req *http.Request) context.Context { return jointContext{ base: parent, valuesOnly: req.Context(), } } // RegisterTestRequest registers the HTTP request req for testing, such that // any API calls are sent to the provided URL. // It should only be used by test code or test helpers like aetest. func RegisterTestRequest(req *http.Request, apiURL *url.URL, appID string) *http.Request { ctx := req.Context() ctx = withAPIHostOverride(ctx, apiURL.Hostname()) ctx = withAPIPortOverride(ctx, apiURL.Port()) ctx = WithAppIDOverride(ctx, appID) // use the unregistered request as a placeholder so that withContext can read the headers c := &aeContext{req: req} c.req = req.WithContext(withContext(ctx, c)) return c.req } var errTimeout = &CallError{ Detail: "Deadline exceeded", Code: int32(remotepb.RpcError_CANCELLED), Timeout: true, } func (c *aeContext) 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 *aeContext) 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 *aeContext) WriteHeader(code int) { if c.outCode != 0 { logf(c, 3, "WriteHeader called multiple times on request.") // error level return } c.outCode = code } func post(ctx context.Context, body []byte, timeout time.Duration) (b []byte, err error) { apiURL := apiURL(ctx) hreq := &http.Request{ Method: "POST", URL: 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: apiURL.Host, } c := fromContext(ctx) if c != nil { 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 context.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) // 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 := "" if c != nil { ticket = c.req.Header.Get(ticketHeader) 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 := post(ctx, 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 *aeContext) Request() *http.Request { return c.req } func ContextForTesting(req *http.Request) context.Context { return toContext(&aeContext{req: req}) }
mail
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/mail/mail_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/mail"; package appengine.v2; message MailServiceError { enum ErrorCode { OK = 0; INTERNAL_ERROR = 1; BAD_REQUEST = 2; UNAUTHORIZED_SENDER = 3; INVALID_ATTACHMENT_TYPE = 4; INVALID_HEADER_NAME = 5; INVALID_CONTENT_ID = 6; } } message MailAttachment { required string FileName = 1; required bytes Data = 2; optional string ContentID = 3; } message MailHeader { required string name = 1; required string value = 2; } message MailMessage { required string Sender = 1; optional string ReplyTo = 2; repeated string To = 3; repeated string Cc = 4; repeated string Bcc = 5; required string Subject = 6; optional string TextBody = 7; optional string HtmlBody = 8; repeated MailAttachment Attachment = 9; repeated MailHeader Header = 10; }
mail
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/mail/mail_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: mail_service.proto package mail import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type MailServiceError_ErrorCode int32 const ( MailServiceError_OK MailServiceError_ErrorCode = 0 MailServiceError_INTERNAL_ERROR MailServiceError_ErrorCode = 1 MailServiceError_BAD_REQUEST MailServiceError_ErrorCode = 2 MailServiceError_UNAUTHORIZED_SENDER MailServiceError_ErrorCode = 3 MailServiceError_INVALID_ATTACHMENT_TYPE MailServiceError_ErrorCode = 4 MailServiceError_INVALID_HEADER_NAME MailServiceError_ErrorCode = 5 MailServiceError_INVALID_CONTENT_ID MailServiceError_ErrorCode = 6 ) // Enum value maps for MailServiceError_ErrorCode. var ( MailServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "INTERNAL_ERROR", 2: "BAD_REQUEST", 3: "UNAUTHORIZED_SENDER", 4: "INVALID_ATTACHMENT_TYPE", 5: "INVALID_HEADER_NAME", 6: "INVALID_CONTENT_ID", } MailServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "INTERNAL_ERROR": 1, "BAD_REQUEST": 2, "UNAUTHORIZED_SENDER": 3, "INVALID_ATTACHMENT_TYPE": 4, "INVALID_HEADER_NAME": 5, "INVALID_CONTENT_ID": 6, } ) func (x MailServiceError_ErrorCode) Enum() *MailServiceError_ErrorCode { p := new(MailServiceError_ErrorCode) *p = x return p } func (x MailServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MailServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_mail_service_proto_enumTypes[0].Descriptor() } func (MailServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_mail_service_proto_enumTypes[0] } func (x MailServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MailServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MailServiceError_ErrorCode(num) return nil } // Deprecated: Use MailServiceError_ErrorCode.Descriptor instead. func (MailServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_mail_service_proto_rawDescGZIP(), []int{0, 0} } type MailServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MailServiceError) Reset() { *x = MailServiceError{} if protoimpl.UnsafeEnabled { mi := &file_mail_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MailServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*MailServiceError) ProtoMessage() {} func (x *MailServiceError) ProtoReflect() protoreflect.Message { mi := &file_mail_service_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 MailServiceError.ProtoReflect.Descriptor instead. func (*MailServiceError) Descriptor() ([]byte, []int) { return file_mail_service_proto_rawDescGZIP(), []int{0} } type MailAttachment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields FileName *string `protobuf:"bytes,1,req,name=FileName" json:"FileName,omitempty"` Data []byte `protobuf:"bytes,2,req,name=Data" json:"Data,omitempty"` ContentID *string `protobuf:"bytes,3,opt,name=ContentID" json:"ContentID,omitempty"` } func (x *MailAttachment) Reset() { *x = MailAttachment{} if protoimpl.UnsafeEnabled { mi := &file_mail_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MailAttachment) String() string { return protoimpl.X.MessageStringOf(x) } func (*MailAttachment) ProtoMessage() {} func (x *MailAttachment) ProtoReflect() protoreflect.Message { mi := &file_mail_service_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 MailAttachment.ProtoReflect.Descriptor instead. func (*MailAttachment) Descriptor() ([]byte, []int) { return file_mail_service_proto_rawDescGZIP(), []int{1} } func (x *MailAttachment) GetFileName() string { if x != nil && x.FileName != nil { return *x.FileName } return "" } func (x *MailAttachment) GetData() []byte { if x != nil { return x.Data } return nil } func (x *MailAttachment) GetContentID() string { if x != nil && x.ContentID != nil { return *x.ContentID } return "" } type MailHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` } func (x *MailHeader) Reset() { *x = MailHeader{} if protoimpl.UnsafeEnabled { mi := &file_mail_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MailHeader) String() string { return protoimpl.X.MessageStringOf(x) } func (*MailHeader) ProtoMessage() {} func (x *MailHeader) ProtoReflect() protoreflect.Message { mi := &file_mail_service_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 MailHeader.ProtoReflect.Descriptor instead. func (*MailHeader) Descriptor() ([]byte, []int) { return file_mail_service_proto_rawDescGZIP(), []int{2} } func (x *MailHeader) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *MailHeader) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } type MailMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Sender *string `protobuf:"bytes,1,req,name=Sender" json:"Sender,omitempty"` ReplyTo *string `protobuf:"bytes,2,opt,name=ReplyTo" json:"ReplyTo,omitempty"` To []string `protobuf:"bytes,3,rep,name=To" json:"To,omitempty"` Cc []string `protobuf:"bytes,4,rep,name=Cc" json:"Cc,omitempty"` Bcc []string `protobuf:"bytes,5,rep,name=Bcc" json:"Bcc,omitempty"` Subject *string `protobuf:"bytes,6,req,name=Subject" json:"Subject,omitempty"` TextBody *string `protobuf:"bytes,7,opt,name=TextBody" json:"TextBody,omitempty"` HtmlBody *string `protobuf:"bytes,8,opt,name=HtmlBody" json:"HtmlBody,omitempty"` Attachment []*MailAttachment `protobuf:"bytes,9,rep,name=Attachment" json:"Attachment,omitempty"` Header []*MailHeader `protobuf:"bytes,10,rep,name=Header" json:"Header,omitempty"` } func (x *MailMessage) Reset() { *x = MailMessage{} if protoimpl.UnsafeEnabled { mi := &file_mail_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MailMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*MailMessage) ProtoMessage() {} func (x *MailMessage) ProtoReflect() protoreflect.Message { mi := &file_mail_service_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 MailMessage.ProtoReflect.Descriptor instead. func (*MailMessage) Descriptor() ([]byte, []int) { return file_mail_service_proto_rawDescGZIP(), []int{3} } func (x *MailMessage) GetSender() string { if x != nil && x.Sender != nil { return *x.Sender } return "" } func (x *MailMessage) GetReplyTo() string { if x != nil && x.ReplyTo != nil { return *x.ReplyTo } return "" } func (x *MailMessage) GetTo() []string { if x != nil { return x.To } return nil } func (x *MailMessage) GetCc() []string { if x != nil { return x.Cc } return nil } func (x *MailMessage) GetBcc() []string { if x != nil { return x.Bcc } return nil } func (x *MailMessage) GetSubject() string { if x != nil && x.Subject != nil { return *x.Subject } return "" } func (x *MailMessage) GetTextBody() string { if x != nil && x.TextBody != nil { return *x.TextBody } return "" } func (x *MailMessage) GetHtmlBody() string { if x != nil && x.HtmlBody != nil { return *x.HtmlBody } return "" } func (x *MailMessage) GetAttachment() []*MailAttachment { if x != nil { return x.Attachment } return nil } func (x *MailMessage) GetHeader() []*MailHeader { if x != nil { return x.Header } return nil } var File_mail_service_proto protoreflect.FileDescriptor var file_mail_service_proto_rawDesc = []byte{ 0x0a, 0x12, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0xb4, 0x01, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x9f, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x41, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x48, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x10, 0x06, 0x22, 0x5e, 0x0a, 0x0e, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x36, 0x0a, 0x0a, 0x4d, 0x61, 0x69, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x0b, 0x4d, 0x61, 0x69, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x54, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x43, 0x63, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x43, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x42, 0x63, 0x63, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x42, 0x63, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x65, 0x78, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x54, 0x65, 0x78, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x48, 0x74, 0x6d, 0x6c, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x48, 0x74, 0x6d, 0x6c, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6d, 0x61, 0x69, 0x6c, } var ( file_mail_service_proto_rawDescOnce sync.Once file_mail_service_proto_rawDescData = file_mail_service_proto_rawDesc ) func file_mail_service_proto_rawDescGZIP() []byte { file_mail_service_proto_rawDescOnce.Do(func() { file_mail_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_mail_service_proto_rawDescData) }) return file_mail_service_proto_rawDescData } var file_mail_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_mail_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_mail_service_proto_goTypes = []interface{}{ (MailServiceError_ErrorCode)(0), // 0: appengine.v2.MailServiceError.ErrorCode (*MailServiceError)(nil), // 1: appengine.v2.MailServiceError (*MailAttachment)(nil), // 2: appengine.v2.MailAttachment (*MailHeader)(nil), // 3: appengine.v2.MailHeader (*MailMessage)(nil), // 4: appengine.v2.MailMessage } var file_mail_service_proto_depIdxs = []int32{ 2, // 0: appengine.v2.MailMessage.Attachment:type_name -> appengine.v2.MailAttachment 3, // 1: appengine.v2.MailMessage.Header:type_name -> appengine.v2.MailHeader 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_mail_service_proto_init() } func file_mail_service_proto_init() { if File_mail_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_mail_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MailServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_mail_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MailAttachment); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_mail_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MailHeader); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_mail_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MailMessage); 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_mail_service_proto_rawDesc, NumEnums: 1, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_mail_service_proto_goTypes, DependencyIndexes: file_mail_service_proto_depIdxs, EnumInfos: file_mail_service_proto_enumTypes, MessageInfos: file_mail_service_proto_msgTypes, }.Build() File_mail_service_proto = out.File file_mail_service_proto_rawDesc = nil file_mail_service_proto_goTypes = nil file_mail_service_proto_depIdxs = nil }
modules
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/modules/modules_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/modules"; package appengine.v2; message ModulesServiceError { enum ErrorCode { OK = 0; INVALID_MODULE = 1; INVALID_VERSION = 2; INVALID_INSTANCES = 3; TRANSIENT_ERROR = 4; UNEXPECTED_STATE = 5; } } message GetModulesRequest { } message GetModulesResponse { repeated string module = 1; } message GetVersionsRequest { optional string module = 1; } message GetVersionsResponse { repeated string version = 1; } message GetDefaultVersionRequest { optional string module = 1; } message GetDefaultVersionResponse { required string version = 1; } message GetNumInstancesRequest { optional string module = 1; optional string version = 2; } message GetNumInstancesResponse { required int64 instances = 1; } message SetNumInstancesRequest { optional string module = 1; optional string version = 2; required int64 instances = 3; } message SetNumInstancesResponse {} message StartModuleRequest { required string module = 1; required string version = 2; } message StartModuleResponse {} message StopModuleRequest { optional string module = 1; optional string version = 2; } message StopModuleResponse {} message GetHostnameRequest { optional string module = 1; optional string version = 2; optional string instance = 3; } message GetHostnameResponse { required string hostname = 1; }
modules
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/modules/modules_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: modules_service.proto package modules import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type ModulesServiceError_ErrorCode int32 const ( ModulesServiceError_OK ModulesServiceError_ErrorCode = 0 ModulesServiceError_INVALID_MODULE ModulesServiceError_ErrorCode = 1 ModulesServiceError_INVALID_VERSION ModulesServiceError_ErrorCode = 2 ModulesServiceError_INVALID_INSTANCES ModulesServiceError_ErrorCode = 3 ModulesServiceError_TRANSIENT_ERROR ModulesServiceError_ErrorCode = 4 ModulesServiceError_UNEXPECTED_STATE ModulesServiceError_ErrorCode = 5 ) // Enum value maps for ModulesServiceError_ErrorCode. var ( ModulesServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "INVALID_MODULE", 2: "INVALID_VERSION", 3: "INVALID_INSTANCES", 4: "TRANSIENT_ERROR", 5: "UNEXPECTED_STATE", } ModulesServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "INVALID_MODULE": 1, "INVALID_VERSION": 2, "INVALID_INSTANCES": 3, "TRANSIENT_ERROR": 4, "UNEXPECTED_STATE": 5, } ) func (x ModulesServiceError_ErrorCode) Enum() *ModulesServiceError_ErrorCode { p := new(ModulesServiceError_ErrorCode) *p = x return p } func (x ModulesServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ModulesServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_modules_service_proto_enumTypes[0].Descriptor() } func (ModulesServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_modules_service_proto_enumTypes[0] } func (x ModulesServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *ModulesServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = ModulesServiceError_ErrorCode(num) return nil } // Deprecated: Use ModulesServiceError_ErrorCode.Descriptor instead. func (ModulesServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{0, 0} } type ModulesServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *ModulesServiceError) Reset() { *x = ModulesServiceError{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ModulesServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*ModulesServiceError) ProtoMessage() {} func (x *ModulesServiceError) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 ModulesServiceError.ProtoReflect.Descriptor instead. func (*ModulesServiceError) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{0} } type GetModulesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *GetModulesRequest) Reset() { *x = GetModulesRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetModulesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetModulesRequest) ProtoMessage() {} func (x *GetModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetModulesRequest.ProtoReflect.Descriptor instead. func (*GetModulesRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{1} } type GetModulesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module []string `protobuf:"bytes,1,rep,name=module" json:"module,omitempty"` } func (x *GetModulesResponse) Reset() { *x = GetModulesResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetModulesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetModulesResponse) ProtoMessage() {} func (x *GetModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetModulesResponse.ProtoReflect.Descriptor instead. func (*GetModulesResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{2} } func (x *GetModulesResponse) GetModule() []string { if x != nil { return x.Module } return nil } type GetVersionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` } func (x *GetVersionsRequest) Reset() { *x = GetVersionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetVersionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetVersionsRequest) ProtoMessage() {} func (x *GetVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetVersionsRequest.ProtoReflect.Descriptor instead. func (*GetVersionsRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{3} } func (x *GetVersionsRequest) GetModule() string { if x != nil && x.Module != nil { return *x.Module } return "" } type GetVersionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Version []string `protobuf:"bytes,1,rep,name=version" json:"version,omitempty"` } func (x *GetVersionsResponse) Reset() { *x = GetVersionsResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetVersionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetVersionsResponse) ProtoMessage() {} func (x *GetVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetVersionsResponse.ProtoReflect.Descriptor instead. func (*GetVersionsResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{4} } func (x *GetVersionsResponse) GetVersion() []string { if x != nil { return x.Version } return nil } type GetDefaultVersionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` } func (x *GetDefaultVersionRequest) Reset() { *x = GetDefaultVersionRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetDefaultVersionRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetDefaultVersionRequest) ProtoMessage() {} func (x *GetDefaultVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetDefaultVersionRequest.ProtoReflect.Descriptor instead. func (*GetDefaultVersionRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{5} } func (x *GetDefaultVersionRequest) GetModule() string { if x != nil && x.Module != nil { return *x.Module } return "" } type GetDefaultVersionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Version *string `protobuf:"bytes,1,req,name=version" json:"version,omitempty"` } func (x *GetDefaultVersionResponse) Reset() { *x = GetDefaultVersionResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetDefaultVersionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetDefaultVersionResponse) ProtoMessage() {} func (x *GetDefaultVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetDefaultVersionResponse.ProtoReflect.Descriptor instead. func (*GetDefaultVersionResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{6} } func (x *GetDefaultVersionResponse) GetVersion() string { if x != nil && x.Version != nil { return *x.Version } return "" } type GetNumInstancesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` } func (x *GetNumInstancesRequest) Reset() { *x = GetNumInstancesRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetNumInstancesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetNumInstancesRequest) ProtoMessage() {} func (x *GetNumInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetNumInstancesRequest.ProtoReflect.Descriptor instead. func (*GetNumInstancesRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{7} } func (x *GetNumInstancesRequest) GetModule() string { if x != nil && x.Module != nil { return *x.Module } return "" } func (x *GetNumInstancesRequest) GetVersion() string { if x != nil && x.Version != nil { return *x.Version } return "" } type GetNumInstancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Instances *int64 `protobuf:"varint,1,req,name=instances" json:"instances,omitempty"` } func (x *GetNumInstancesResponse) Reset() { *x = GetNumInstancesResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetNumInstancesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetNumInstancesResponse) ProtoMessage() {} func (x *GetNumInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetNumInstancesResponse.ProtoReflect.Descriptor instead. func (*GetNumInstancesResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{8} } func (x *GetNumInstancesResponse) GetInstances() int64 { if x != nil && x.Instances != nil { return *x.Instances } return 0 } type SetNumInstancesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` Instances *int64 `protobuf:"varint,3,req,name=instances" json:"instances,omitempty"` } func (x *SetNumInstancesRequest) Reset() { *x = SetNumInstancesRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetNumInstancesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetNumInstancesRequest) ProtoMessage() {} func (x *SetNumInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 SetNumInstancesRequest.ProtoReflect.Descriptor instead. func (*SetNumInstancesRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{9} } func (x *SetNumInstancesRequest) GetModule() string { if x != nil && x.Module != nil { return *x.Module } return "" } func (x *SetNumInstancesRequest) GetVersion() string { if x != nil && x.Version != nil { return *x.Version } return "" } func (x *SetNumInstancesRequest) GetInstances() int64 { if x != nil && x.Instances != nil { return *x.Instances } return 0 } type SetNumInstancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *SetNumInstancesResponse) Reset() { *x = SetNumInstancesResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SetNumInstancesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*SetNumInstancesResponse) ProtoMessage() {} func (x *SetNumInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 SetNumInstancesResponse.ProtoReflect.Descriptor instead. func (*SetNumInstancesResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{10} } type StartModuleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module *string `protobuf:"bytes,1,req,name=module" json:"module,omitempty"` Version *string `protobuf:"bytes,2,req,name=version" json:"version,omitempty"` } func (x *StartModuleRequest) Reset() { *x = StartModuleRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StartModuleRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*StartModuleRequest) ProtoMessage() {} func (x *StartModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 StartModuleRequest.ProtoReflect.Descriptor instead. func (*StartModuleRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{11} } func (x *StartModuleRequest) GetModule() string { if x != nil && x.Module != nil { return *x.Module } return "" } func (x *StartModuleRequest) GetVersion() string { if x != nil && x.Version != nil { return *x.Version } return "" } type StartModuleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *StartModuleResponse) Reset() { *x = StartModuleResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StartModuleResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*StartModuleResponse) ProtoMessage() {} func (x *StartModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 StartModuleResponse.ProtoReflect.Descriptor instead. func (*StartModuleResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{12} } type StopModuleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` } func (x *StopModuleRequest) Reset() { *x = StopModuleRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StopModuleRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*StopModuleRequest) ProtoMessage() {} func (x *StopModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 StopModuleRequest.ProtoReflect.Descriptor instead. func (*StopModuleRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{13} } func (x *StopModuleRequest) GetModule() string { if x != nil && x.Module != nil { return *x.Module } return "" } func (x *StopModuleRequest) GetVersion() string { if x != nil && x.Version != nil { return *x.Version } return "" } type StopModuleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *StopModuleResponse) Reset() { *x = StopModuleResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StopModuleResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*StopModuleResponse) ProtoMessage() {} func (x *StopModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 StopModuleResponse.ProtoReflect.Descriptor instead. func (*StopModuleResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{14} } type GetHostnameRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` Instance *string `protobuf:"bytes,3,opt,name=instance" json:"instance,omitempty"` } func (x *GetHostnameRequest) Reset() { *x = GetHostnameRequest{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetHostnameRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetHostnameRequest) ProtoMessage() {} func (x *GetHostnameRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetHostnameRequest.ProtoReflect.Descriptor instead. func (*GetHostnameRequest) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{15} } func (x *GetHostnameRequest) GetModule() string { if x != nil && x.Module != nil { return *x.Module } return "" } func (x *GetHostnameRequest) GetVersion() string { if x != nil && x.Version != nil { return *x.Version } return "" } func (x *GetHostnameRequest) GetInstance() string { if x != nil && x.Instance != nil { return *x.Instance } return "" } type GetHostnameResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Hostname *string `protobuf:"bytes,1,req,name=hostname" json:"hostname,omitempty"` } func (x *GetHostnameResponse) Reset() { *x = GetHostnameResponse{} if protoimpl.UnsafeEnabled { mi := &file_modules_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetHostnameResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetHostnameResponse) ProtoMessage() {} func (x *GetHostnameResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_service_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 GetHostnameResponse.ProtoReflect.Descriptor instead. func (*GetHostnameResponse) Descriptor() ([]byte, []int) { return file_modules_service_proto_rawDescGZIP(), []int{16} } func (x *GetHostnameResponse) GetHostname() string { if x != nil && x.Hostname != nil { return *x.Hostname } return "" } var File_modules_service_proto protoreflect.FileDescriptor var file_modules_service_proto_rawDesc = []byte{ 0x0a, 0x15, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0x95, 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7e, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x05, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x35, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x75, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x37, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4e, 0x75, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x68, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4e, 0x75, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4e, 0x75, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, } var ( file_modules_service_proto_rawDescOnce sync.Once file_modules_service_proto_rawDescData = file_modules_service_proto_rawDesc ) func file_modules_service_proto_rawDescGZIP() []byte { file_modules_service_proto_rawDescOnce.Do(func() { file_modules_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_modules_service_proto_rawDescData) }) return file_modules_service_proto_rawDescData } var file_modules_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_modules_service_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_modules_service_proto_goTypes = []interface{}{ (ModulesServiceError_ErrorCode)(0), // 0: appengine.v2.ModulesServiceError.ErrorCode (*ModulesServiceError)(nil), // 1: appengine.v2.ModulesServiceError (*GetModulesRequest)(nil), // 2: appengine.v2.GetModulesRequest (*GetModulesResponse)(nil), // 3: appengine.v2.GetModulesResponse (*GetVersionsRequest)(nil), // 4: appengine.v2.GetVersionsRequest (*GetVersionsResponse)(nil), // 5: appengine.v2.GetVersionsResponse (*GetDefaultVersionRequest)(nil), // 6: appengine.v2.GetDefaultVersionRequest (*GetDefaultVersionResponse)(nil), // 7: appengine.v2.GetDefaultVersionResponse (*GetNumInstancesRequest)(nil), // 8: appengine.v2.GetNumInstancesRequest (*GetNumInstancesResponse)(nil), // 9: appengine.v2.GetNumInstancesResponse (*SetNumInstancesRequest)(nil), // 10: appengine.v2.SetNumInstancesRequest (*SetNumInstancesResponse)(nil), // 11: appengine.v2.SetNumInstancesResponse (*StartModuleRequest)(nil), // 12: appengine.v2.StartModuleRequest (*StartModuleResponse)(nil), // 13: appengine.v2.StartModuleResponse (*StopModuleRequest)(nil), // 14: appengine.v2.StopModuleRequest (*StopModuleResponse)(nil), // 15: appengine.v2.StopModuleResponse (*GetHostnameRequest)(nil), // 16: appengine.v2.GetHostnameRequest (*GetHostnameResponse)(nil), // 17: appengine.v2.GetHostnameResponse } var file_modules_service_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_modules_service_proto_init() } func file_modules_service_proto_init() { if File_modules_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_modules_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ModulesServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetModulesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetModulesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetVersionsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetVersionsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDefaultVersionRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDefaultVersionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetNumInstancesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetNumInstancesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetNumInstancesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetNumInstancesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartModuleRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartModuleResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StopModuleRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StopModuleResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetHostnameRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_modules_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetHostnameResponse); 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_modules_service_proto_rawDesc, NumEnums: 1, NumMessages: 17, NumExtensions: 0, NumServices: 0, }, GoTypes: file_modules_service_proto_goTypes, DependencyIndexes: file_modules_service_proto_depIdxs, EnumInfos: file_modules_service_proto_enumTypes, MessageInfos: file_modules_service_proto_msgTypes, }.Build() File_modules_service_proto = out.File file_modules_service_proto_rawDesc = nil file_modules_service_proto_goTypes = nil file_modules_service_proto_depIdxs = nil }
app_identity
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/app_identity/app_identity_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: app_identity_service.proto package app_identity import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type AppIdentityServiceError_ErrorCode int32 const ( AppIdentityServiceError_SUCCESS AppIdentityServiceError_ErrorCode = 0 AppIdentityServiceError_UNKNOWN_SCOPE AppIdentityServiceError_ErrorCode = 9 AppIdentityServiceError_BLOB_TOO_LARGE AppIdentityServiceError_ErrorCode = 1000 AppIdentityServiceError_DEADLINE_EXCEEDED AppIdentityServiceError_ErrorCode = 1001 AppIdentityServiceError_NOT_A_VALID_APP AppIdentityServiceError_ErrorCode = 1002 AppIdentityServiceError_UNKNOWN_ERROR AppIdentityServiceError_ErrorCode = 1003 AppIdentityServiceError_NOT_ALLOWED AppIdentityServiceError_ErrorCode = 1005 AppIdentityServiceError_NOT_IMPLEMENTED AppIdentityServiceError_ErrorCode = 1006 ) // Enum value maps for AppIdentityServiceError_ErrorCode. var ( AppIdentityServiceError_ErrorCode_name = map[int32]string{ 0: "SUCCESS", 9: "UNKNOWN_SCOPE", 1000: "BLOB_TOO_LARGE", 1001: "DEADLINE_EXCEEDED", 1002: "NOT_A_VALID_APP", 1003: "UNKNOWN_ERROR", 1005: "NOT_ALLOWED", 1006: "NOT_IMPLEMENTED", } AppIdentityServiceError_ErrorCode_value = map[string]int32{ "SUCCESS": 0, "UNKNOWN_SCOPE": 9, "BLOB_TOO_LARGE": 1000, "DEADLINE_EXCEEDED": 1001, "NOT_A_VALID_APP": 1002, "UNKNOWN_ERROR": 1003, "NOT_ALLOWED": 1005, "NOT_IMPLEMENTED": 1006, } ) func (x AppIdentityServiceError_ErrorCode) Enum() *AppIdentityServiceError_ErrorCode { p := new(AppIdentityServiceError_ErrorCode) *p = x return p } func (x AppIdentityServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (AppIdentityServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_app_identity_service_proto_enumTypes[0].Descriptor() } func (AppIdentityServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_app_identity_service_proto_enumTypes[0] } func (x AppIdentityServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *AppIdentityServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = AppIdentityServiceError_ErrorCode(num) return nil } // Deprecated: Use AppIdentityServiceError_ErrorCode.Descriptor instead. func (AppIdentityServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{0, 0} } type AppIdentityServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *AppIdentityServiceError) Reset() { *x = AppIdentityServiceError{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AppIdentityServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*AppIdentityServiceError) ProtoMessage() {} func (x *AppIdentityServiceError) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 AppIdentityServiceError.ProtoReflect.Descriptor instead. func (*AppIdentityServiceError) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{0} } type SignForAppRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BytesToSign []byte `protobuf:"bytes,1,opt,name=bytes_to_sign,json=bytesToSign" json:"bytes_to_sign,omitempty"` } func (x *SignForAppRequest) Reset() { *x = SignForAppRequest{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SignForAppRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*SignForAppRequest) ProtoMessage() {} func (x *SignForAppRequest) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 SignForAppRequest.ProtoReflect.Descriptor instead. func (*SignForAppRequest) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{1} } func (x *SignForAppRequest) GetBytesToSign() []byte { if x != nil { return x.BytesToSign } return nil } type SignForAppResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` SignatureBytes []byte `protobuf:"bytes,2,opt,name=signature_bytes,json=signatureBytes" json:"signature_bytes,omitempty"` } func (x *SignForAppResponse) Reset() { *x = SignForAppResponse{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SignForAppResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*SignForAppResponse) ProtoMessage() {} func (x *SignForAppResponse) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 SignForAppResponse.ProtoReflect.Descriptor instead. func (*SignForAppResponse) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{2} } func (x *SignForAppResponse) GetKeyName() string { if x != nil && x.KeyName != nil { return *x.KeyName } return "" } func (x *SignForAppResponse) GetSignatureBytes() []byte { if x != nil { return x.SignatureBytes } return nil } type GetPublicCertificateForAppRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *GetPublicCertificateForAppRequest) Reset() { *x = GetPublicCertificateForAppRequest{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetPublicCertificateForAppRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetPublicCertificateForAppRequest) ProtoMessage() {} func (x *GetPublicCertificateForAppRequest) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetPublicCertificateForAppRequest.ProtoReflect.Descriptor instead. func (*GetPublicCertificateForAppRequest) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{3} } type PublicCertificate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` X509CertificatePem *string `protobuf:"bytes,2,opt,name=x509_certificate_pem,json=x509CertificatePem" json:"x509_certificate_pem,omitempty"` } func (x *PublicCertificate) Reset() { *x = PublicCertificate{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PublicCertificate) String() string { return protoimpl.X.MessageStringOf(x) } func (*PublicCertificate) ProtoMessage() {} func (x *PublicCertificate) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 PublicCertificate.ProtoReflect.Descriptor instead. func (*PublicCertificate) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{4} } func (x *PublicCertificate) GetKeyName() string { if x != nil && x.KeyName != nil { return *x.KeyName } return "" } func (x *PublicCertificate) GetX509CertificatePem() string { if x != nil && x.X509CertificatePem != nil { return *x.X509CertificatePem } return "" } type GetPublicCertificateForAppResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PublicCertificateList []*PublicCertificate `protobuf:"bytes,1,rep,name=public_certificate_list,json=publicCertificateList" json:"public_certificate_list,omitempty"` MaxClientCacheTimeInSecond *int64 `protobuf:"varint,2,opt,name=max_client_cache_time_in_second,json=maxClientCacheTimeInSecond" json:"max_client_cache_time_in_second,omitempty"` } func (x *GetPublicCertificateForAppResponse) Reset() { *x = GetPublicCertificateForAppResponse{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetPublicCertificateForAppResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetPublicCertificateForAppResponse) ProtoMessage() {} func (x *GetPublicCertificateForAppResponse) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetPublicCertificateForAppResponse.ProtoReflect.Descriptor instead. func (*GetPublicCertificateForAppResponse) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{5} } func (x *GetPublicCertificateForAppResponse) GetPublicCertificateList() []*PublicCertificate { if x != nil { return x.PublicCertificateList } return nil } func (x *GetPublicCertificateForAppResponse) GetMaxClientCacheTimeInSecond() int64 { if x != nil && x.MaxClientCacheTimeInSecond != nil { return *x.MaxClientCacheTimeInSecond } return 0 } type GetServiceAccountNameRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *GetServiceAccountNameRequest) Reset() { *x = GetServiceAccountNameRequest{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetServiceAccountNameRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetServiceAccountNameRequest) ProtoMessage() {} func (x *GetServiceAccountNameRequest) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetServiceAccountNameRequest.ProtoReflect.Descriptor instead. func (*GetServiceAccountNameRequest) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{6} } type GetServiceAccountNameResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ServiceAccountName *string `protobuf:"bytes,1,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` } func (x *GetServiceAccountNameResponse) Reset() { *x = GetServiceAccountNameResponse{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetServiceAccountNameResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetServiceAccountNameResponse) ProtoMessage() {} func (x *GetServiceAccountNameResponse) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetServiceAccountNameResponse.ProtoReflect.Descriptor instead. func (*GetServiceAccountNameResponse) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{7} } func (x *GetServiceAccountNameResponse) GetServiceAccountName() string { if x != nil && x.ServiceAccountName != nil { return *x.ServiceAccountName } return "" } type GetAccessTokenRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Scope []string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty"` ServiceAccountId *int64 `protobuf:"varint,2,opt,name=service_account_id,json=serviceAccountId" json:"service_account_id,omitempty"` ServiceAccountName *string `protobuf:"bytes,3,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` } func (x *GetAccessTokenRequest) Reset() { *x = GetAccessTokenRequest{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetAccessTokenRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetAccessTokenRequest) ProtoMessage() {} func (x *GetAccessTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetAccessTokenRequest.ProtoReflect.Descriptor instead. func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{8} } func (x *GetAccessTokenRequest) GetScope() []string { if x != nil { return x.Scope } return nil } func (x *GetAccessTokenRequest) GetServiceAccountId() int64 { if x != nil && x.ServiceAccountId != nil { return *x.ServiceAccountId } return 0 } func (x *GetAccessTokenRequest) GetServiceAccountName() string { if x != nil && x.ServiceAccountName != nil { return *x.ServiceAccountName } return "" } type GetAccessTokenResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AccessToken *string `protobuf:"bytes,1,opt,name=access_token,json=accessToken" json:"access_token,omitempty"` ExpirationTime *int64 `protobuf:"varint,2,opt,name=expiration_time,json=expirationTime" json:"expiration_time,omitempty"` } func (x *GetAccessTokenResponse) Reset() { *x = GetAccessTokenResponse{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetAccessTokenResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetAccessTokenResponse) ProtoMessage() {} func (x *GetAccessTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetAccessTokenResponse.ProtoReflect.Descriptor instead. func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{9} } func (x *GetAccessTokenResponse) GetAccessToken() string { if x != nil && x.AccessToken != nil { return *x.AccessToken } return "" } func (x *GetAccessTokenResponse) GetExpirationTime() int64 { if x != nil && x.ExpirationTime != nil { return *x.ExpirationTime } return 0 } type GetDefaultGcsBucketNameRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *GetDefaultGcsBucketNameRequest) Reset() { *x = GetDefaultGcsBucketNameRequest{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetDefaultGcsBucketNameRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} func (x *GetDefaultGcsBucketNameRequest) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetDefaultGcsBucketNameRequest.ProtoReflect.Descriptor instead. func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{10} } type GetDefaultGcsBucketNameResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name,json=defaultGcsBucketName" json:"default_gcs_bucket_name,omitempty"` } func (x *GetDefaultGcsBucketNameResponse) Reset() { *x = GetDefaultGcsBucketNameResponse{} if protoimpl.UnsafeEnabled { mi := &file_app_identity_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetDefaultGcsBucketNameResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetDefaultGcsBucketNameResponse) ProtoMessage() {} func (x *GetDefaultGcsBucketNameResponse) ProtoReflect() protoreflect.Message { mi := &file_app_identity_service_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 GetDefaultGcsBucketNameResponse.ProtoReflect.Descriptor instead. func (*GetDefaultGcsBucketNameResponse) Descriptor() ([]byte, []int) { return file_app_identity_service_proto_rawDescGZIP(), []int{11} } func (x *GetDefaultGcsBucketNameResponse) GetDefaultGcsBucketName() string { if x != nil && x.DefaultGcsBucketName != nil { return *x.DefaultGcsBucketName } return "" } var File_app_identity_service_proto protoreflect.FileDescriptor var file_app_identity_service_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x41, 0x70, 0x70, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xaa, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0e, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0xe8, 0x07, 0x12, 0x16, 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0xe9, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x10, 0xea, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xeb, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, 0xed, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0xee, 0x07, 0x22, 0x37, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x46, 0x6f, 0x72, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x22, 0x58, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x46, 0x6f, 0x72, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x60, 0x0a, 0x11, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x78, 0x35, 0x30, 0x39, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x78, 0x35, 0x30, 0x39, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x65, 0x6d, 0x22, 0xc2, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x17, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x1f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x6d, 0x61, 0x78, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x67, 0x63, 0x73, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3b, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, } var ( file_app_identity_service_proto_rawDescOnce sync.Once file_app_identity_service_proto_rawDescData = file_app_identity_service_proto_rawDesc ) func file_app_identity_service_proto_rawDescGZIP() []byte { file_app_identity_service_proto_rawDescOnce.Do(func() { file_app_identity_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_identity_service_proto_rawDescData) }) return file_app_identity_service_proto_rawDescData } var file_app_identity_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_app_identity_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_app_identity_service_proto_goTypes = []interface{}{ (AppIdentityServiceError_ErrorCode)(0), // 0: appengine.v2.AppIdentityServiceError.ErrorCode (*AppIdentityServiceError)(nil), // 1: appengine.v2.AppIdentityServiceError (*SignForAppRequest)(nil), // 2: appengine.v2.SignForAppRequest (*SignForAppResponse)(nil), // 3: appengine.v2.SignForAppResponse (*GetPublicCertificateForAppRequest)(nil), // 4: appengine.v2.GetPublicCertificateForAppRequest (*PublicCertificate)(nil), // 5: appengine.v2.PublicCertificate (*GetPublicCertificateForAppResponse)(nil), // 6: appengine.v2.GetPublicCertificateForAppResponse (*GetServiceAccountNameRequest)(nil), // 7: appengine.v2.GetServiceAccountNameRequest (*GetServiceAccountNameResponse)(nil), // 8: appengine.v2.GetServiceAccountNameResponse (*GetAccessTokenRequest)(nil), // 9: appengine.v2.GetAccessTokenRequest (*GetAccessTokenResponse)(nil), // 10: appengine.v2.GetAccessTokenResponse (*GetDefaultGcsBucketNameRequest)(nil), // 11: appengine.v2.GetDefaultGcsBucketNameRequest (*GetDefaultGcsBucketNameResponse)(nil), // 12: appengine.v2.GetDefaultGcsBucketNameResponse } var file_app_identity_service_proto_depIdxs = []int32{ 5, // 0: appengine.v2.GetPublicCertificateForAppResponse.public_certificate_list:type_name -> appengine.v2.PublicCertificate 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_app_identity_service_proto_init() } func file_app_identity_service_proto_init() { if File_app_identity_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_app_identity_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AppIdentityServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignForAppRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignForAppResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPublicCertificateForAppRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PublicCertificate); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPublicCertificateForAppResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetServiceAccountNameRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetServiceAccountNameResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAccessTokenRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAccessTokenResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDefaultGcsBucketNameRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_app_identity_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDefaultGcsBucketNameResponse); 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_app_identity_service_proto_rawDesc, NumEnums: 1, NumMessages: 12, NumExtensions: 0, NumServices: 0, }, GoTypes: file_app_identity_service_proto_goTypes, DependencyIndexes: file_app_identity_service_proto_depIdxs, EnumInfos: file_app_identity_service_proto_enumTypes, MessageInfos: file_app_identity_service_proto_msgTypes, }.Build() File_app_identity_service_proto = out.File file_app_identity_service_proto_rawDesc = nil file_app_identity_service_proto_goTypes = nil file_app_identity_service_proto_depIdxs = nil }
app_identity
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/app_identity/app_identity_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/app_identity"; package appengine.v2; message AppIdentityServiceError { enum ErrorCode { SUCCESS = 0; UNKNOWN_SCOPE = 9; BLOB_TOO_LARGE = 1000; DEADLINE_EXCEEDED = 1001; NOT_A_VALID_APP = 1002; UNKNOWN_ERROR = 1003; NOT_ALLOWED = 1005; NOT_IMPLEMENTED = 1006; } } message SignForAppRequest { optional bytes bytes_to_sign = 1; } message SignForAppResponse { optional string key_name = 1; optional bytes signature_bytes = 2; } message GetPublicCertificateForAppRequest { } message PublicCertificate { optional string key_name = 1; optional string x509_certificate_pem = 2; } message GetPublicCertificateForAppResponse { repeated PublicCertificate public_certificate_list = 1; optional int64 max_client_cache_time_in_second = 2; } message GetServiceAccountNameRequest { } message GetServiceAccountNameResponse { optional string service_account_name = 1; } message GetAccessTokenRequest { repeated string scope = 1; optional int64 service_account_id = 2; optional string service_account_name = 3; } message GetAccessTokenResponse { optional string access_token = 1; optional int64 expiration_time = 2; } message GetDefaultGcsBucketNameRequest { } message GetDefaultGcsBucketNameResponse { optional string default_gcs_bucket_name = 1; }
system
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/system/system_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/system"; package appengine.v2; message SystemServiceError { enum ErrorCode { OK = 0; INTERNAL_ERROR = 1; BACKEND_REQUIRED = 2; LIMIT_REACHED = 3; } } message SystemStat { // Instaneous value of this stat. optional double current = 1; // Average over time, if this stat has an instaneous value. optional double average1m = 3; optional double average10m = 4; // Total value, if the stat accumulates over time. optional double total = 2; // Rate over time, if this stat accumulates. optional double rate1m = 5; optional double rate10m = 6; } message GetSystemStatsRequest { } message GetSystemStatsResponse { // CPU used by this instance, in mcycles. optional SystemStat cpu = 1; // Physical memory (RAM) used by this instance, in megabytes. optional SystemStat memory = 2; } message StartBackgroundRequestRequest { } message StartBackgroundRequestResponse { // Every /_ah/background request will have an X-AppEngine-BackgroundRequest // header, whose value will be equal to this parameter, the request_id. optional string request_id = 1; }
system
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/system/system_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: system_service.proto package system import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type SystemServiceError_ErrorCode int32 const ( SystemServiceError_OK SystemServiceError_ErrorCode = 0 SystemServiceError_INTERNAL_ERROR SystemServiceError_ErrorCode = 1 SystemServiceError_BACKEND_REQUIRED SystemServiceError_ErrorCode = 2 SystemServiceError_LIMIT_REACHED SystemServiceError_ErrorCode = 3 ) // Enum value maps for SystemServiceError_ErrorCode. var ( SystemServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "INTERNAL_ERROR", 2: "BACKEND_REQUIRED", 3: "LIMIT_REACHED", } SystemServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "INTERNAL_ERROR": 1, "BACKEND_REQUIRED": 2, "LIMIT_REACHED": 3, } ) func (x SystemServiceError_ErrorCode) Enum() *SystemServiceError_ErrorCode { p := new(SystemServiceError_ErrorCode) *p = x return p } func (x SystemServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (SystemServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_system_service_proto_enumTypes[0].Descriptor() } func (SystemServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_system_service_proto_enumTypes[0] } func (x SystemServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *SystemServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = SystemServiceError_ErrorCode(num) return nil } // Deprecated: Use SystemServiceError_ErrorCode.Descriptor instead. func (SystemServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_system_service_proto_rawDescGZIP(), []int{0, 0} } type SystemServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *SystemServiceError) Reset() { *x = SystemServiceError{} if protoimpl.UnsafeEnabled { mi := &file_system_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SystemServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*SystemServiceError) ProtoMessage() {} func (x *SystemServiceError) ProtoReflect() protoreflect.Message { mi := &file_system_service_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 SystemServiceError.ProtoReflect.Descriptor instead. func (*SystemServiceError) Descriptor() ([]byte, []int) { return file_system_service_proto_rawDescGZIP(), []int{0} } type SystemStat struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Instaneous value of this stat. Current *float64 `protobuf:"fixed64,1,opt,name=current" json:"current,omitempty"` // Average over time, if this stat has an instaneous value. Average1M *float64 `protobuf:"fixed64,3,opt,name=average1m" json:"average1m,omitempty"` Average10M *float64 `protobuf:"fixed64,4,opt,name=average10m" json:"average10m,omitempty"` // Total value, if the stat accumulates over time. Total *float64 `protobuf:"fixed64,2,opt,name=total" json:"total,omitempty"` // Rate over time, if this stat accumulates. Rate1M *float64 `protobuf:"fixed64,5,opt,name=rate1m" json:"rate1m,omitempty"` Rate10M *float64 `protobuf:"fixed64,6,opt,name=rate10m" json:"rate10m,omitempty"` } func (x *SystemStat) Reset() { *x = SystemStat{} if protoimpl.UnsafeEnabled { mi := &file_system_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SystemStat) String() string { return protoimpl.X.MessageStringOf(x) } func (*SystemStat) ProtoMessage() {} func (x *SystemStat) ProtoReflect() protoreflect.Message { mi := &file_system_service_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 SystemStat.ProtoReflect.Descriptor instead. func (*SystemStat) Descriptor() ([]byte, []int) { return file_system_service_proto_rawDescGZIP(), []int{1} } func (x *SystemStat) GetCurrent() float64 { if x != nil && x.Current != nil { return *x.Current } return 0 } func (x *SystemStat) GetAverage1M() float64 { if x != nil && x.Average1M != nil { return *x.Average1M } return 0 } func (x *SystemStat) GetAverage10M() float64 { if x != nil && x.Average10M != nil { return *x.Average10M } return 0 } func (x *SystemStat) GetTotal() float64 { if x != nil && x.Total != nil { return *x.Total } return 0 } func (x *SystemStat) GetRate1M() float64 { if x != nil && x.Rate1M != nil { return *x.Rate1M } return 0 } func (x *SystemStat) GetRate10M() float64 { if x != nil && x.Rate10M != nil { return *x.Rate10M } return 0 } type GetSystemStatsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *GetSystemStatsRequest) Reset() { *x = GetSystemStatsRequest{} if protoimpl.UnsafeEnabled { mi := &file_system_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetSystemStatsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetSystemStatsRequest) ProtoMessage() {} func (x *GetSystemStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_system_service_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 GetSystemStatsRequest.ProtoReflect.Descriptor instead. func (*GetSystemStatsRequest) Descriptor() ([]byte, []int) { return file_system_service_proto_rawDescGZIP(), []int{2} } type GetSystemStatsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // CPU used by this instance, in mcycles. Cpu *SystemStat `protobuf:"bytes,1,opt,name=cpu" json:"cpu,omitempty"` // Physical memory (RAM) used by this instance, in megabytes. Memory *SystemStat `protobuf:"bytes,2,opt,name=memory" json:"memory,omitempty"` } func (x *GetSystemStatsResponse) Reset() { *x = GetSystemStatsResponse{} if protoimpl.UnsafeEnabled { mi := &file_system_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetSystemStatsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetSystemStatsResponse) ProtoMessage() {} func (x *GetSystemStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_system_service_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 GetSystemStatsResponse.ProtoReflect.Descriptor instead. func (*GetSystemStatsResponse) Descriptor() ([]byte, []int) { return file_system_service_proto_rawDescGZIP(), []int{3} } func (x *GetSystemStatsResponse) GetCpu() *SystemStat { if x != nil { return x.Cpu } return nil } func (x *GetSystemStatsResponse) GetMemory() *SystemStat { if x != nil { return x.Memory } return nil } type StartBackgroundRequestRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *StartBackgroundRequestRequest) Reset() { *x = StartBackgroundRequestRequest{} if protoimpl.UnsafeEnabled { mi := &file_system_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StartBackgroundRequestRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*StartBackgroundRequestRequest) ProtoMessage() {} func (x *StartBackgroundRequestRequest) ProtoReflect() protoreflect.Message { mi := &file_system_service_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 StartBackgroundRequestRequest.ProtoReflect.Descriptor instead. func (*StartBackgroundRequestRequest) Descriptor() ([]byte, []int) { return file_system_service_proto_rawDescGZIP(), []int{4} } type StartBackgroundRequestResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Every /_ah/background request will have an X-AppEngine-BackgroundRequest // header, whose value will be equal to this parameter, the request_id. RequestId *string `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"` } func (x *StartBackgroundRequestResponse) Reset() { *x = StartBackgroundRequestResponse{} if protoimpl.UnsafeEnabled { mi := &file_system_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StartBackgroundRequestResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*StartBackgroundRequestResponse) ProtoMessage() {} func (x *StartBackgroundRequestResponse) ProtoReflect() protoreflect.Message { mi := &file_system_service_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 StartBackgroundRequestResponse.ProtoReflect.Descriptor instead. func (*StartBackgroundRequestResponse) Descriptor() ([]byte, []int) { return file_system_service_proto_rawDescGZIP(), []int{5} } func (x *StartBackgroundRequestResponse) GetRequestId() string { if x != nil && x.RequestId != nil { return *x.RequestId } return "" } var File_system_service_proto protoreflect.FileDescriptor var file_system_service_proto_rawDesc = []byte{ 0x0a, 0x14, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0x66, 0x0a, 0x12, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x50, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x48, 0x45, 0x44, 0x10, 0x03, 0x22, 0xac, 0x01, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x31, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x31, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x31, 0x30, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x31, 0x30, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x74, 0x65, 0x31, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x72, 0x61, 0x74, 0x65, 0x31, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x61, 0x74, 0x65, 0x31, 0x30, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x72, 0x61, 0x74, 0x65, 0x31, 0x30, 0x6d, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x76, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x30, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x1e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, } var ( file_system_service_proto_rawDescOnce sync.Once file_system_service_proto_rawDescData = file_system_service_proto_rawDesc ) func file_system_service_proto_rawDescGZIP() []byte { file_system_service_proto_rawDescOnce.Do(func() { file_system_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_system_service_proto_rawDescData) }) return file_system_service_proto_rawDescData } var file_system_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_system_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_system_service_proto_goTypes = []interface{}{ (SystemServiceError_ErrorCode)(0), // 0: appengine.v2.SystemServiceError.ErrorCode (*SystemServiceError)(nil), // 1: appengine.v2.SystemServiceError (*SystemStat)(nil), // 2: appengine.v2.SystemStat (*GetSystemStatsRequest)(nil), // 3: appengine.v2.GetSystemStatsRequest (*GetSystemStatsResponse)(nil), // 4: appengine.v2.GetSystemStatsResponse (*StartBackgroundRequestRequest)(nil), // 5: appengine.v2.StartBackgroundRequestRequest (*StartBackgroundRequestResponse)(nil), // 6: appengine.v2.StartBackgroundRequestResponse } var file_system_service_proto_depIdxs = []int32{ 2, // 0: appengine.v2.GetSystemStatsResponse.cpu:type_name -> appengine.v2.SystemStat 2, // 1: appengine.v2.GetSystemStatsResponse.memory:type_name -> appengine.v2.SystemStat 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_system_service_proto_init() } func file_system_service_proto_init() { if File_system_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_system_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SystemServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_system_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SystemStat); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_system_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSystemStatsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_system_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSystemStatsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_system_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartBackgroundRequestRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_system_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartBackgroundRequestResponse); 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_system_service_proto_rawDesc, NumEnums: 1, NumMessages: 6, NumExtensions: 0, NumServices: 0, }, GoTypes: file_system_service_proto_goTypes, DependencyIndexes: file_system_service_proto_depIdxs, EnumInfos: file_system_service_proto_enumTypes, MessageInfos: file_system_service_proto_msgTypes, }.Build() File_system_service_proto = out.File file_system_service_proto_rawDesc = nil file_system_service_proto_goTypes = nil file_system_service_proto_depIdxs = nil }
blobstore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/blobstore/blobstore_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/blobstore"; package appengine.v2; message BlobstoreServiceError { enum ErrorCode { OK = 0; INTERNAL_ERROR = 1; URL_TOO_LONG = 2; PERMISSION_DENIED = 3; BLOB_NOT_FOUND = 4; DATA_INDEX_OUT_OF_RANGE = 5; BLOB_FETCH_SIZE_TOO_LARGE = 6; ARGUMENT_OUT_OF_RANGE = 8; INVALID_BLOB_KEY = 9; } } message CreateUploadURLRequest { required string success_path = 1; optional int64 max_upload_size_bytes = 2; optional int64 max_upload_size_per_blob_bytes = 3; optional string gs_bucket_name = 4; optional int32 url_expiry_time_seconds = 5; } message CreateUploadURLResponse { required string url = 1; } message DeleteBlobRequest { repeated string blob_key = 1; optional string token = 2; } message FetchDataRequest { required string blob_key = 1; required int64 start_index = 2; required int64 end_index = 3; } message FetchDataResponse { required bytes data = 1000 [ctype = CORD]; } message CloneBlobRequest { required bytes blob_key = 1; required bytes mime_type = 2; required bytes target_app_id = 3; } message CloneBlobResponse { required bytes blob_key = 1; } message DecodeBlobKeyRequest { repeated string blob_key = 1; } message DecodeBlobKeyResponse { repeated string decoded = 1; } message CreateEncodedGoogleStorageKeyRequest { required string filename = 1; } message CreateEncodedGoogleStorageKeyResponse { required string blob_key = 1; }
blobstore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/blobstore/blobstore_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: blobstore_service.proto package blobstore import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type BlobstoreServiceError_ErrorCode int32 const ( BlobstoreServiceError_OK BlobstoreServiceError_ErrorCode = 0 BlobstoreServiceError_INTERNAL_ERROR BlobstoreServiceError_ErrorCode = 1 BlobstoreServiceError_URL_TOO_LONG BlobstoreServiceError_ErrorCode = 2 BlobstoreServiceError_PERMISSION_DENIED BlobstoreServiceError_ErrorCode = 3 BlobstoreServiceError_BLOB_NOT_FOUND BlobstoreServiceError_ErrorCode = 4 BlobstoreServiceError_DATA_INDEX_OUT_OF_RANGE BlobstoreServiceError_ErrorCode = 5 BlobstoreServiceError_BLOB_FETCH_SIZE_TOO_LARGE BlobstoreServiceError_ErrorCode = 6 BlobstoreServiceError_ARGUMENT_OUT_OF_RANGE BlobstoreServiceError_ErrorCode = 8 BlobstoreServiceError_INVALID_BLOB_KEY BlobstoreServiceError_ErrorCode = 9 ) // Enum value maps for BlobstoreServiceError_ErrorCode. var ( BlobstoreServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "INTERNAL_ERROR", 2: "URL_TOO_LONG", 3: "PERMISSION_DENIED", 4: "BLOB_NOT_FOUND", 5: "DATA_INDEX_OUT_OF_RANGE", 6: "BLOB_FETCH_SIZE_TOO_LARGE", 8: "ARGUMENT_OUT_OF_RANGE", 9: "INVALID_BLOB_KEY", } BlobstoreServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "INTERNAL_ERROR": 1, "URL_TOO_LONG": 2, "PERMISSION_DENIED": 3, "BLOB_NOT_FOUND": 4, "DATA_INDEX_OUT_OF_RANGE": 5, "BLOB_FETCH_SIZE_TOO_LARGE": 6, "ARGUMENT_OUT_OF_RANGE": 8, "INVALID_BLOB_KEY": 9, } ) func (x BlobstoreServiceError_ErrorCode) Enum() *BlobstoreServiceError_ErrorCode { p := new(BlobstoreServiceError_ErrorCode) *p = x return p } func (x BlobstoreServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (BlobstoreServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_blobstore_service_proto_enumTypes[0].Descriptor() } func (BlobstoreServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_blobstore_service_proto_enumTypes[0] } func (x BlobstoreServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *BlobstoreServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = BlobstoreServiceError_ErrorCode(num) return nil } // Deprecated: Use BlobstoreServiceError_ErrorCode.Descriptor instead. func (BlobstoreServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{0, 0} } type BlobstoreServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *BlobstoreServiceError) Reset() { *x = BlobstoreServiceError{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *BlobstoreServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*BlobstoreServiceError) ProtoMessage() {} func (x *BlobstoreServiceError) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 BlobstoreServiceError.ProtoReflect.Descriptor instead. func (*BlobstoreServiceError) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{0} } type CreateUploadURLRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SuccessPath *string `protobuf:"bytes,1,req,name=success_path,json=successPath" json:"success_path,omitempty"` MaxUploadSizeBytes *int64 `protobuf:"varint,2,opt,name=max_upload_size_bytes,json=maxUploadSizeBytes" json:"max_upload_size_bytes,omitempty"` MaxUploadSizePerBlobBytes *int64 `protobuf:"varint,3,opt,name=max_upload_size_per_blob_bytes,json=maxUploadSizePerBlobBytes" json:"max_upload_size_per_blob_bytes,omitempty"` GsBucketName *string `protobuf:"bytes,4,opt,name=gs_bucket_name,json=gsBucketName" json:"gs_bucket_name,omitempty"` UrlExpiryTimeSeconds *int32 `protobuf:"varint,5,opt,name=url_expiry_time_seconds,json=urlExpiryTimeSeconds" json:"url_expiry_time_seconds,omitempty"` } func (x *CreateUploadURLRequest) Reset() { *x = CreateUploadURLRequest{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateUploadURLRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateUploadURLRequest) ProtoMessage() {} func (x *CreateUploadURLRequest) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 CreateUploadURLRequest.ProtoReflect.Descriptor instead. func (*CreateUploadURLRequest) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{1} } func (x *CreateUploadURLRequest) GetSuccessPath() string { if x != nil && x.SuccessPath != nil { return *x.SuccessPath } return "" } func (x *CreateUploadURLRequest) GetMaxUploadSizeBytes() int64 { if x != nil && x.MaxUploadSizeBytes != nil { return *x.MaxUploadSizeBytes } return 0 } func (x *CreateUploadURLRequest) GetMaxUploadSizePerBlobBytes() int64 { if x != nil && x.MaxUploadSizePerBlobBytes != nil { return *x.MaxUploadSizePerBlobBytes } return 0 } func (x *CreateUploadURLRequest) GetGsBucketName() string { if x != nil && x.GsBucketName != nil { return *x.GsBucketName } return "" } func (x *CreateUploadURLRequest) GetUrlExpiryTimeSeconds() int32 { if x != nil && x.UrlExpiryTimeSeconds != nil { return *x.UrlExpiryTimeSeconds } return 0 } type CreateUploadURLResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Url *string `protobuf:"bytes,1,req,name=url" json:"url,omitempty"` } func (x *CreateUploadURLResponse) Reset() { *x = CreateUploadURLResponse{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateUploadURLResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateUploadURLResponse) ProtoMessage() {} func (x *CreateUploadURLResponse) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 CreateUploadURLResponse.ProtoReflect.Descriptor instead. func (*CreateUploadURLResponse) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{2} } func (x *CreateUploadURLResponse) GetUrl() string { if x != nil && x.Url != nil { return *x.Url } return "" } type DeleteBlobRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey []string `protobuf:"bytes,1,rep,name=blob_key,json=blobKey" json:"blob_key,omitempty"` Token *string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` } func (x *DeleteBlobRequest) Reset() { *x = DeleteBlobRequest{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteBlobRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteBlobRequest) ProtoMessage() {} func (x *DeleteBlobRequest) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 DeleteBlobRequest.ProtoReflect.Descriptor instead. func (*DeleteBlobRequest) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{3} } func (x *DeleteBlobRequest) GetBlobKey() []string { if x != nil { return x.BlobKey } return nil } func (x *DeleteBlobRequest) GetToken() string { if x != nil && x.Token != nil { return *x.Token } return "" } type FetchDataRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"` StartIndex *int64 `protobuf:"varint,2,req,name=start_index,json=startIndex" json:"start_index,omitempty"` EndIndex *int64 `protobuf:"varint,3,req,name=end_index,json=endIndex" json:"end_index,omitempty"` } func (x *FetchDataRequest) Reset() { *x = FetchDataRequest{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FetchDataRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*FetchDataRequest) ProtoMessage() {} func (x *FetchDataRequest) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 FetchDataRequest.ProtoReflect.Descriptor instead. func (*FetchDataRequest) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{4} } func (x *FetchDataRequest) GetBlobKey() string { if x != nil && x.BlobKey != nil { return *x.BlobKey } return "" } func (x *FetchDataRequest) GetStartIndex() int64 { if x != nil && x.StartIndex != nil { return *x.StartIndex } return 0 } func (x *FetchDataRequest) GetEndIndex() int64 { if x != nil && x.EndIndex != nil { return *x.EndIndex } return 0 } type FetchDataResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Data []byte `protobuf:"bytes,1000,req,name=data" json:"data,omitempty"` } func (x *FetchDataResponse) Reset() { *x = FetchDataResponse{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FetchDataResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*FetchDataResponse) ProtoMessage() {} func (x *FetchDataResponse) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 FetchDataResponse.ProtoReflect.Descriptor instead. func (*FetchDataResponse) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{5} } func (x *FetchDataResponse) GetData() []byte { if x != nil { return x.Data } return nil } type CloneBlobRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey []byte `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"` MimeType []byte `protobuf:"bytes,2,req,name=mime_type,json=mimeType" json:"mime_type,omitempty"` TargetAppId []byte `protobuf:"bytes,3,req,name=target_app_id,json=targetAppId" json:"target_app_id,omitempty"` } func (x *CloneBlobRequest) Reset() { *x = CloneBlobRequest{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CloneBlobRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CloneBlobRequest) ProtoMessage() {} func (x *CloneBlobRequest) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 CloneBlobRequest.ProtoReflect.Descriptor instead. func (*CloneBlobRequest) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{6} } func (x *CloneBlobRequest) GetBlobKey() []byte { if x != nil { return x.BlobKey } return nil } func (x *CloneBlobRequest) GetMimeType() []byte { if x != nil { return x.MimeType } return nil } func (x *CloneBlobRequest) GetTargetAppId() []byte { if x != nil { return x.TargetAppId } return nil } type CloneBlobResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey []byte `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"` } func (x *CloneBlobResponse) Reset() { *x = CloneBlobResponse{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CloneBlobResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CloneBlobResponse) ProtoMessage() {} func (x *CloneBlobResponse) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 CloneBlobResponse.ProtoReflect.Descriptor instead. func (*CloneBlobResponse) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{7} } func (x *CloneBlobResponse) GetBlobKey() []byte { if x != nil { return x.BlobKey } return nil } type DecodeBlobKeyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey []string `protobuf:"bytes,1,rep,name=blob_key,json=blobKey" json:"blob_key,omitempty"` } func (x *DecodeBlobKeyRequest) Reset() { *x = DecodeBlobKeyRequest{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DecodeBlobKeyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DecodeBlobKeyRequest) ProtoMessage() {} func (x *DecodeBlobKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 DecodeBlobKeyRequest.ProtoReflect.Descriptor instead. func (*DecodeBlobKeyRequest) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{8} } func (x *DecodeBlobKeyRequest) GetBlobKey() []string { if x != nil { return x.BlobKey } return nil } type DecodeBlobKeyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Decoded []string `protobuf:"bytes,1,rep,name=decoded" json:"decoded,omitempty"` } func (x *DecodeBlobKeyResponse) Reset() { *x = DecodeBlobKeyResponse{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DecodeBlobKeyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DecodeBlobKeyResponse) ProtoMessage() {} func (x *DecodeBlobKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 DecodeBlobKeyResponse.ProtoReflect.Descriptor instead. func (*DecodeBlobKeyResponse) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{9} } func (x *DecodeBlobKeyResponse) GetDecoded() []string { if x != nil { return x.Decoded } return nil } type CreateEncodedGoogleStorageKeyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Filename *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"` } func (x *CreateEncodedGoogleStorageKeyRequest) Reset() { *x = CreateEncodedGoogleStorageKeyRequest{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateEncodedGoogleStorageKeyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateEncodedGoogleStorageKeyRequest) ProtoMessage() {} func (x *CreateEncodedGoogleStorageKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 CreateEncodedGoogleStorageKeyRequest.ProtoReflect.Descriptor instead. func (*CreateEncodedGoogleStorageKeyRequest) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{10} } func (x *CreateEncodedGoogleStorageKeyRequest) GetFilename() string { if x != nil && x.Filename != nil { return *x.Filename } return "" } type CreateEncodedGoogleStorageKeyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"` } func (x *CreateEncodedGoogleStorageKeyResponse) Reset() { *x = CreateEncodedGoogleStorageKeyResponse{} if protoimpl.UnsafeEnabled { mi := &file_blobstore_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateEncodedGoogleStorageKeyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateEncodedGoogleStorageKeyResponse) ProtoMessage() {} func (x *CreateEncodedGoogleStorageKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_blobstore_service_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 CreateEncodedGoogleStorageKeyResponse.ProtoReflect.Descriptor instead. func (*CreateEncodedGoogleStorageKeyResponse) Descriptor() ([]byte, []int) { return file_blobstore_service_proto_rawDescGZIP(), []int{11} } func (x *CreateEncodedGoogleStorageKeyResponse) GetBlobKey() string { if x != nil && x.BlobKey != nil { return *x.BlobKey } return "" } var File_blobstore_service_proto protoreflect.FileDescriptor var file_blobstore_service_proto_rawDesc = []byte{ 0x0a, 0x17, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0xeb, 0x01, 0x0a, 0x15, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xd1, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x52, 0x4c, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x05, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x46, 0x45, 0x54, 0x43, 0x48, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x09, 0x22, 0x8e, 0x02, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x1e, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x6d, 0x61, 0x78, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x50, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x62, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x67, 0x73, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x75, 0x72, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x75, 0x72, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x2b, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x44, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6b, 0x0a, 0x10, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x2c, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0xe8, 0x07, 0x20, 0x02, 0x28, 0x0c, 0x42, 0x02, 0x08, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6e, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x70, 0x70, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x11, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x31, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x31, 0x0a, 0x15, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x42, 0x0a, 0x24, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x25, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x74, 0x6f, 0x72, 0x65, } var ( file_blobstore_service_proto_rawDescOnce sync.Once file_blobstore_service_proto_rawDescData = file_blobstore_service_proto_rawDesc ) func file_blobstore_service_proto_rawDescGZIP() []byte { file_blobstore_service_proto_rawDescOnce.Do(func() { file_blobstore_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_blobstore_service_proto_rawDescData) }) return file_blobstore_service_proto_rawDescData } var file_blobstore_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_blobstore_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_blobstore_service_proto_goTypes = []interface{}{ (BlobstoreServiceError_ErrorCode)(0), // 0: appengine.v2.BlobstoreServiceError.ErrorCode (*BlobstoreServiceError)(nil), // 1: appengine.v2.BlobstoreServiceError (*CreateUploadURLRequest)(nil), // 2: appengine.v2.CreateUploadURLRequest (*CreateUploadURLResponse)(nil), // 3: appengine.v2.CreateUploadURLResponse (*DeleteBlobRequest)(nil), // 4: appengine.v2.DeleteBlobRequest (*FetchDataRequest)(nil), // 5: appengine.v2.FetchDataRequest (*FetchDataResponse)(nil), // 6: appengine.v2.FetchDataResponse (*CloneBlobRequest)(nil), // 7: appengine.v2.CloneBlobRequest (*CloneBlobResponse)(nil), // 8: appengine.v2.CloneBlobResponse (*DecodeBlobKeyRequest)(nil), // 9: appengine.v2.DecodeBlobKeyRequest (*DecodeBlobKeyResponse)(nil), // 10: appengine.v2.DecodeBlobKeyResponse (*CreateEncodedGoogleStorageKeyRequest)(nil), // 11: appengine.v2.CreateEncodedGoogleStorageKeyRequest (*CreateEncodedGoogleStorageKeyResponse)(nil), // 12: appengine.v2.CreateEncodedGoogleStorageKeyResponse } var file_blobstore_service_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_blobstore_service_proto_init() } func file_blobstore_service_proto_init() { if File_blobstore_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_blobstore_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobstoreServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateUploadURLRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateUploadURLResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteBlobRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FetchDataRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FetchDataResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CloneBlobRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CloneBlobResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DecodeBlobKeyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DecodeBlobKeyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateEncodedGoogleStorageKeyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_blobstore_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateEncodedGoogleStorageKeyResponse); 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_blobstore_service_proto_rawDesc, NumEnums: 1, NumMessages: 12, NumExtensions: 0, NumServices: 0, }, GoTypes: file_blobstore_service_proto_goTypes, DependencyIndexes: file_blobstore_service_proto_depIdxs, EnumInfos: file_blobstore_service_proto_enumTypes, MessageInfos: file_blobstore_service_proto_msgTypes, }.Build() File_blobstore_service_proto = out.File file_blobstore_service_proto_rawDesc = nil file_blobstore_service_proto_goTypes = nil file_blobstore_service_proto_depIdxs = nil }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/datastore/datastore_v3.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/datastore"; package appengine.v2; 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; } }
datastore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/datastore/datastore_v3.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: datastore_v3.proto package datastore import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type 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 ) // Enum value maps for Property_Meaning. 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", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Property_Meaning) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[0].Descriptor() } func (Property_Meaning) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[0] } func (x Property_Meaning) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Property_Meaning) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Property_Meaning(num) return nil } // Deprecated: Use Property_Meaning.Descriptor instead. func (Property_Meaning) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{2, 0} } type Property_FtsTokenizationOption int32 const ( Property_HTML Property_FtsTokenizationOption = 1 Property_ATOM Property_FtsTokenizationOption = 2 ) // Enum value maps for Property_FtsTokenizationOption. var ( Property_FtsTokenizationOption_name = map[int32]string{ 1: "HTML", 2: "ATOM", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Property_FtsTokenizationOption) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[1].Descriptor() } func (Property_FtsTokenizationOption) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[1] } func (x Property_FtsTokenizationOption) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Property_FtsTokenizationOption) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Property_FtsTokenizationOption(num) return nil } // Deprecated: Use Property_FtsTokenizationOption.Descriptor instead. func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []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 ) // Enum value maps for EntityProto_Kind. var ( EntityProto_Kind_name = map[int32]string{ 1: "GD_CONTACT", 2: "GD_EVENT", 3: "GD_MESSAGE", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (EntityProto_Kind) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[2].Descriptor() } func (EntityProto_Kind) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[2] } func (x EntityProto_Kind) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *EntityProto_Kind) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = EntityProto_Kind(num) return nil } // Deprecated: Use EntityProto_Kind.Descriptor instead. func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{6, 0} } type Index_Property_Direction int32 const ( Index_Property_ASCENDING Index_Property_Direction = 1 Index_Property_DESCENDING Index_Property_Direction = 2 ) // Enum value maps for Index_Property_Direction. var ( Index_Property_Direction_name = map[int32]string{ 1: "ASCENDING", 2: "DESCENDING", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Index_Property_Direction) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[3].Descriptor() } func (Index_Property_Direction) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[3] } func (x Index_Property_Direction) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Index_Property_Direction) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Index_Property_Direction(num) return nil } // Deprecated: Use Index_Property_Direction.Descriptor instead. func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []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 ) // Enum value maps for CompositeIndex_State. var ( CompositeIndex_State_name = map[int32]string{ 1: "WRITE_ONLY", 2: "READ_WRITE", 3: "DELETED", 4: "ERROR", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CompositeIndex_State) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[4].Descriptor() } func (CompositeIndex_State) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[4] } func (x CompositeIndex_State) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *CompositeIndex_State) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = CompositeIndex_State(num) return nil } // Deprecated: Use CompositeIndex_State.Descriptor instead. func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{9, 0} } type Snapshot_Status int32 const ( Snapshot_INACTIVE Snapshot_Status = 0 Snapshot_ACTIVE Snapshot_Status = 1 ) // Enum value maps for Snapshot_Status. var ( Snapshot_Status_name = map[int32]string{ 0: "INACTIVE", 1: "ACTIVE", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Snapshot_Status) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[5].Descriptor() } func (Snapshot_Status) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[5] } func (x Snapshot_Status) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Snapshot_Status) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Snapshot_Status(num) return nil } // Deprecated: Use Snapshot_Status.Descriptor instead. func (Snapshot_Status) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []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 ) // Enum value maps for Query_Hint. var ( Query_Hint_name = map[int32]string{ 1: "ORDER_FIRST", 2: "ANCESTOR_FIRST", 3: "FILTER_FIRST", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Query_Hint) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[6].Descriptor() } func (Query_Hint) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[6] } func (x Query_Hint) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Query_Hint) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Query_Hint(num) return nil } // Deprecated: Use Query_Hint.Descriptor instead. func (Query_Hint) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []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 ) // Enum value maps for Query_Filter_Operator. 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", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Query_Filter_Operator) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[7].Descriptor() } func (Query_Filter_Operator) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[7] } func (x Query_Filter_Operator) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Query_Filter_Operator) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Query_Filter_Operator(num) return nil } // Deprecated: Use Query_Filter_Operator.Descriptor instead. func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{15, 0, 0} } type Query_Order_Direction int32 const ( Query_Order_ASCENDING Query_Order_Direction = 1 Query_Order_DESCENDING Query_Order_Direction = 2 ) // Enum value maps for Query_Order_Direction. var ( Query_Order_Direction_name = map[int32]string{ 1: "ASCENDING", 2: "DESCENDING", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Query_Order_Direction) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[8].Descriptor() } func (Query_Order_Direction) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[8] } func (x Query_Order_Direction) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Query_Order_Direction) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Query_Order_Direction(num) return nil } // Deprecated: Use Query_Order_Direction.Descriptor instead. func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []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 ) // Enum value maps for Error_ErrorCode. 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", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Error_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[9].Descriptor() } func (Error_ErrorCode) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[9] } func (x Error_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Error_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Error_ErrorCode(num) return nil } // Deprecated: Use Error_ErrorCode.Descriptor instead. func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{19, 0} } type PutRequest_AutoIdPolicy int32 const ( PutRequest_CURRENT PutRequest_AutoIdPolicy = 0 PutRequest_SEQUENTIAL PutRequest_AutoIdPolicy = 1 ) // Enum value maps for PutRequest_AutoIdPolicy. var ( PutRequest_AutoIdPolicy_name = map[int32]string{ 0: "CURRENT", 1: "SEQUENTIAL", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (PutRequest_AutoIdPolicy) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[10].Descriptor() } func (PutRequest_AutoIdPolicy) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[10] } func (x PutRequest_AutoIdPolicy) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = PutRequest_AutoIdPolicy(num) return nil } // Deprecated: Use PutRequest_AutoIdPolicy.Descriptor instead. func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []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 ) // Enum value maps for BeginTransactionRequest_TransactionMode. var ( BeginTransactionRequest_TransactionMode_name = map[int32]string{ 0: "UNKNOWN", 1: "READ_ONLY", 2: "READ_WRITE", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (BeginTransactionRequest_TransactionMode) Descriptor() protoreflect.EnumDescriptor { return file_datastore_v3_proto_enumTypes[11].Descriptor() } func (BeginTransactionRequest_TransactionMode) Type() protoreflect.EnumType { return &file_datastore_v3_proto_enumTypes[11] } func (x BeginTransactionRequest_TransactionMode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = BeginTransactionRequest_TransactionMode(num) return nil } // Deprecated: Use BeginTransactionRequest_TransactionMode.Descriptor instead. func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{36, 0} } type Action struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *Action) Reset() { *x = Action{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Action) String() string { return protoimpl.X.MessageStringOf(x) } func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Action.ProtoReflect.Descriptor instead. func (*Action) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{0} } type PropertyValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *PropertyValue) Reset() { *x = PropertyValue{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PropertyValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*PropertyValue) ProtoMessage() {} func (x *PropertyValue) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 PropertyValue.ProtoReflect.Descriptor instead. func (*PropertyValue) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{1} } func (x *PropertyValue) GetInt64Value() int64 { if x != nil && x.Int64Value != nil { return *x.Int64Value } return 0 } func (x *PropertyValue) GetBooleanValue() bool { if x != nil && x.BooleanValue != nil { return *x.BooleanValue } return false } func (x *PropertyValue) GetStringValue() string { if x != nil && x.StringValue != nil { return *x.StringValue } return "" } func (x *PropertyValue) GetDoubleValue() float64 { if x != nil && x.DoubleValue != nil { return *x.DoubleValue } return 0 } func (x *PropertyValue) GetPointvalue() *PropertyValue_PointValue { if x != nil { return x.Pointvalue } return nil } func (x *PropertyValue) GetUservalue() *PropertyValue_UserValue { if x != nil { return x.Uservalue } return nil } func (x *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue { if x != nil { return x.Referencevalue } return nil } type Property struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Meaning *Property_Meaning `protobuf:"varint,1,opt,name=meaning,enum=appengine.v2.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.v2.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"` Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"` } // Default values for Property fields. const ( Default_Property_Meaning = Property_NO_MEANING Default_Property_Searchable = bool(false) Default_Property_Locale = string("en") ) func (x *Property) Reset() { *x = Property{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Property) String() string { return protoimpl.X.MessageStringOf(x) } func (*Property) ProtoMessage() {} func (x *Property) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Property.ProtoReflect.Descriptor instead. func (*Property) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{2} } func (x *Property) GetMeaning() Property_Meaning { if x != nil && x.Meaning != nil { return *x.Meaning } return Default_Property_Meaning } func (x *Property) GetMeaningUri() string { if x != nil && x.MeaningUri != nil { return *x.MeaningUri } return "" } func (x *Property) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *Property) GetValue() *PropertyValue { if x != nil { return x.Value } return nil } func (x *Property) GetMultiple() bool { if x != nil && x.Multiple != nil { return *x.Multiple } return false } func (x *Property) GetSearchable() bool { if x != nil && x.Searchable != nil { return *x.Searchable } return Default_Property_Searchable } func (x *Property) GetFtsTokenizationOption() Property_FtsTokenizationOption { if x != nil && x.FtsTokenizationOption != nil { return *x.FtsTokenizationOption } return Property_HTML } func (x *Property) GetLocale() string { if x != nil && x.Locale != nil { return *x.Locale } return Default_Property_Locale } type Path struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` } func (x *Path) Reset() { *x = Path{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Path) String() string { return protoimpl.X.MessageStringOf(x) } func (*Path) ProtoMessage() {} func (x *Path) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Path.ProtoReflect.Descriptor instead. func (*Path) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{3} } func (x *Path) GetElement() []*Path_Element { if x != nil { return x.Element } return nil } type Reference struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *Reference) Reset() { *x = Reference{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Reference) String() string { return protoimpl.X.MessageStringOf(x) } func (*Reference) ProtoMessage() {} func (x *Reference) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Reference.ProtoReflect.Descriptor instead. func (*Reference) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{4} } func (x *Reference) GetApp() string { if x != nil && x.App != nil { return *x.App } return "" } func (x *Reference) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return "" } func (x *Reference) GetPath() *Path { if x != nil { return x.Path } return nil } type User struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *User) Reset() { *x = User{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *User) String() string { return protoimpl.X.MessageStringOf(x) } func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 User.ProtoReflect.Descriptor instead. func (*User) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{5} } func (x *User) GetEmail() string { if x != nil && x.Email != nil { return *x.Email } return "" } func (x *User) GetAuthDomain() string { if x != nil && x.AuthDomain != nil { return *x.AuthDomain } return "" } func (x *User) GetNickname() string { if x != nil && x.Nickname != nil { return *x.Nickname } return "" } func (x *User) GetFederatedIdentity() string { if x != nil && x.FederatedIdentity != nil { return *x.FederatedIdentity } return "" } func (x *User) GetFederatedProvider() string { if x != nil && x.FederatedProvider != nil { return *x.FederatedProvider } return "" } type EntityProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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.v2.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"` } func (x *EntityProto) Reset() { *x = EntityProto{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EntityProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*EntityProto) ProtoMessage() {} func (x *EntityProto) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 EntityProto.ProtoReflect.Descriptor instead. func (*EntityProto) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{6} } func (x *EntityProto) GetKey() *Reference { if x != nil { return x.Key } return nil } func (x *EntityProto) GetEntityGroup() *Path { if x != nil { return x.EntityGroup } return nil } func (x *EntityProto) GetOwner() *User { if x != nil { return x.Owner } return nil } func (x *EntityProto) GetKind() EntityProto_Kind { if x != nil && x.Kind != nil { return *x.Kind } return EntityProto_GD_CONTACT } func (x *EntityProto) GetKindUri() string { if x != nil && x.KindUri != nil { return *x.KindUri } return "" } func (x *EntityProto) GetProperty() []*Property { if x != nil { return x.Property } return nil } func (x *EntityProto) GetRawProperty() []*Property { if x != nil { return x.RawProperty } return nil } func (x *EntityProto) GetRank() int32 { if x != nil && x.Rank != nil { return *x.Rank } return 0 } type CompositeProperty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *CompositeProperty) Reset() { *x = CompositeProperty{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompositeProperty) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompositeProperty) ProtoMessage() {} func (x *CompositeProperty) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 CompositeProperty.ProtoReflect.Descriptor instead. func (*CompositeProperty) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{7} } func (x *CompositeProperty) GetIndexId() int64 { if x != nil && x.IndexId != nil { return *x.IndexId } return 0 } func (x *CompositeProperty) GetValue() []string { if x != nil { return x.Value } return nil } type Index struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *Index) Reset() { *x = Index{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Index) String() string { return protoimpl.X.MessageStringOf(x) } func (*Index) ProtoMessage() {} func (x *Index) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Index.ProtoReflect.Descriptor instead. func (*Index) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{8} } func (x *Index) GetEntityType() string { if x != nil && x.EntityType != nil { return *x.EntityType } return "" } func (x *Index) GetAncestor() bool { if x != nil && x.Ancestor != nil { return *x.Ancestor } return false } func (x *Index) GetProperty() []*Index_Property { if x != nil { return x.Property } return nil } type CompositeIndex struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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.v2.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"` } // Default values for CompositeIndex fields. const ( Default_CompositeIndex_OnlyUseIfRequired = bool(false) ) func (x *CompositeIndex) Reset() { *x = CompositeIndex{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompositeIndex) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompositeIndex) ProtoMessage() {} func (x *CompositeIndex) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 CompositeIndex.ProtoReflect.Descriptor instead. func (*CompositeIndex) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{9} } func (x *CompositeIndex) GetAppId() string { if x != nil && x.AppId != nil { return *x.AppId } return "" } func (x *CompositeIndex) GetId() int64 { if x != nil && x.Id != nil { return *x.Id } return 0 } func (x *CompositeIndex) GetDefinition() *Index { if x != nil { return x.Definition } return nil } func (x *CompositeIndex) GetState() CompositeIndex_State { if x != nil && x.State != nil { return *x.State } return CompositeIndex_WRITE_ONLY } func (x *CompositeIndex) GetOnlyUseIfRequired() bool { if x != nil && x.OnlyUseIfRequired != nil { return *x.OnlyUseIfRequired } return Default_CompositeIndex_OnlyUseIfRequired } type IndexPostfix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for IndexPostfix fields. const ( Default_IndexPostfix_Before = bool(true) ) func (x *IndexPostfix) Reset() { *x = IndexPostfix{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexPostfix) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexPostfix) ProtoMessage() {} func (x *IndexPostfix) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 IndexPostfix.ProtoReflect.Descriptor instead. func (*IndexPostfix) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{10} } func (x *IndexPostfix) GetIndexValue() []*IndexPostfix_IndexValue { if x != nil { return x.IndexValue } return nil } func (x *IndexPostfix) GetKey() *Reference { if x != nil { return x.Key } return nil } func (x *IndexPostfix) GetBefore() bool { if x != nil && x.Before != nil { return *x.Before } return Default_IndexPostfix_Before } type IndexPosition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"` } // Default values for IndexPosition fields. const ( Default_IndexPosition_Before = bool(true) ) func (x *IndexPosition) Reset() { *x = IndexPosition{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexPosition) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexPosition) ProtoMessage() {} func (x *IndexPosition) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 IndexPosition.ProtoReflect.Descriptor instead. func (*IndexPosition) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{11} } func (x *IndexPosition) GetKey() string { if x != nil && x.Key != nil { return *x.Key } return "" } func (x *IndexPosition) GetBefore() bool { if x != nil && x.Before != nil { return *x.Before } return Default_IndexPosition_Before } type Snapshot struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"` } func (x *Snapshot) Reset() { *x = Snapshot{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Snapshot) String() string { return protoimpl.X.MessageStringOf(x) } func (*Snapshot) ProtoMessage() {} func (x *Snapshot) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Snapshot.ProtoReflect.Descriptor instead. func (*Snapshot) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{12} } func (x *Snapshot) GetTs() int64 { if x != nil && x.Ts != nil { return *x.Ts } return 0 } type InternalHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"` } func (x *InternalHeader) Reset() { *x = InternalHeader{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *InternalHeader) String() string { return protoimpl.X.MessageStringOf(x) } func (*InternalHeader) ProtoMessage() {} func (x *InternalHeader) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 InternalHeader.ProtoReflect.Descriptor instead. func (*InternalHeader) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{13} } func (x *InternalHeader) GetQos() string { if x != nil && x.Qos != nil { return *x.Qos } return "" } type Transaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for Transaction fields. const ( Default_Transaction_MarkChanges = bool(false) ) func (x *Transaction) Reset() { *x = Transaction{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Transaction) String() string { return protoimpl.X.MessageStringOf(x) } func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Transaction.ProtoReflect.Descriptor instead. func (*Transaction) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{14} } func (x *Transaction) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *Transaction) GetHandle() uint64 { if x != nil && x.Handle != nil { return *x.Handle } return 0 } func (x *Transaction) GetApp() string { if x != nil && x.App != nil { return *x.App } return "" } func (x *Transaction) GetMarkChanges() bool { if x != nil && x.MarkChanges != nil { return *x.MarkChanges } return Default_Transaction_MarkChanges } type Query struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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.v2.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"` } // Default values for Query fields. const ( Default_Query_Offset = int32(0) Default_Query_RequirePerfectPlan = bool(false) Default_Query_KeysOnly = bool(false) Default_Query_Compile = bool(false) Default_Query_PersistOffset = bool(false) ) func (x *Query) Reset() { *x = Query{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Query) String() string { return protoimpl.X.MessageStringOf(x) } func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Query.ProtoReflect.Descriptor instead. func (*Query) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{15} } func (x *Query) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *Query) GetApp() string { if x != nil && x.App != nil { return *x.App } return "" } func (x *Query) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return "" } func (x *Query) GetKind() string { if x != nil && x.Kind != nil { return *x.Kind } return "" } func (x *Query) GetAncestor() *Reference { if x != nil { return x.Ancestor } return nil } func (x *Query) GetFilter() []*Query_Filter { if x != nil { return x.Filter } return nil } func (x *Query) GetSearchQuery() string { if x != nil && x.SearchQuery != nil { return *x.SearchQuery } return "" } func (x *Query) GetOrder() []*Query_Order { if x != nil { return x.Order } return nil } func (x *Query) GetHint() Query_Hint { if x != nil && x.Hint != nil { return *x.Hint } return Query_ORDER_FIRST } func (x *Query) GetCount() int32 { if x != nil && x.Count != nil { return *x.Count } return 0 } func (x *Query) GetOffset() int32 { if x != nil && x.Offset != nil { return *x.Offset } return Default_Query_Offset } func (x *Query) GetLimit() int32 { if x != nil && x.Limit != nil { return *x.Limit } return 0 } func (x *Query) GetCompiledCursor() *CompiledCursor { if x != nil { return x.CompiledCursor } return nil } func (x *Query) GetEndCompiledCursor() *CompiledCursor { if x != nil { return x.EndCompiledCursor } return nil } func (x *Query) GetCompositeIndex() []*CompositeIndex { if x != nil { return x.CompositeIndex } return nil } func (x *Query) GetRequirePerfectPlan() bool { if x != nil && x.RequirePerfectPlan != nil { return *x.RequirePerfectPlan } return Default_Query_RequirePerfectPlan } func (x *Query) GetKeysOnly() bool { if x != nil && x.KeysOnly != nil { return *x.KeysOnly } return Default_Query_KeysOnly } func (x *Query) GetTransaction() *Transaction { if x != nil { return x.Transaction } return nil } func (x *Query) GetCompile() bool { if x != nil && x.Compile != nil { return *x.Compile } return Default_Query_Compile } func (x *Query) GetFailoverMs() int64 { if x != nil && x.FailoverMs != nil { return *x.FailoverMs } return 0 } func (x *Query) GetStrong() bool { if x != nil && x.Strong != nil { return *x.Strong } return false } func (x *Query) GetPropertyName() []string { if x != nil { return x.PropertyName } return nil } func (x *Query) GetGroupByPropertyName() []string { if x != nil { return x.GroupByPropertyName } return nil } func (x *Query) GetDistinct() bool { if x != nil && x.Distinct != nil { return *x.Distinct } return false } func (x *Query) GetMinSafeTimeSeconds() int64 { if x != nil && x.MinSafeTimeSeconds != nil { return *x.MinSafeTimeSeconds } return 0 } func (x *Query) GetSafeReplicaName() []string { if x != nil { return x.SafeReplicaName } return nil } func (x *Query) GetPersistOffset() bool { if x != nil && x.PersistOffset != nil { return *x.PersistOffset } return Default_Query_PersistOffset } type CompiledQuery struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for CompiledQuery fields. const ( Default_CompiledQuery_Offset = int32(0) ) func (x *CompiledQuery) Reset() { *x = CompiledQuery{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompiledQuery) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompiledQuery) ProtoMessage() {} func (x *CompiledQuery) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 CompiledQuery.ProtoReflect.Descriptor instead. func (*CompiledQuery) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{16} } func (x *CompiledQuery) GetPrimaryscan() *CompiledQuery_PrimaryScan { if x != nil { return x.Primaryscan } return nil } func (x *CompiledQuery) GetMergejoinscan() []*CompiledQuery_MergeJoinScan { if x != nil { return x.Mergejoinscan } return nil } func (x *CompiledQuery) GetIndexDef() *Index { if x != nil { return x.IndexDef } return nil } func (x *CompiledQuery) GetOffset() int32 { if x != nil && x.Offset != nil { return *x.Offset } return Default_CompiledQuery_Offset } func (x *CompiledQuery) GetLimit() int32 { if x != nil && x.Limit != nil { return *x.Limit } return 0 } func (x *CompiledQuery) GetKeysOnly() bool { if x != nil && x.KeysOnly != nil { return *x.KeysOnly } return false } func (x *CompiledQuery) GetPropertyName() []string { if x != nil { return x.PropertyName } return nil } func (x *CompiledQuery) GetDistinctInfixSize() int32 { if x != nil && x.DistinctInfixSize != nil { return *x.DistinctInfixSize } return 0 } func (x *CompiledQuery) GetEntityfilter() *CompiledQuery_EntityFilter { if x != nil { return x.Entityfilter } return nil } type CompiledCursor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"` } func (x *CompiledCursor) Reset() { *x = CompiledCursor{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompiledCursor) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompiledCursor) ProtoMessage() {} func (x *CompiledCursor) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 CompiledCursor.ProtoReflect.Descriptor instead. func (*CompiledCursor) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{17} } func (x *CompiledCursor) GetPosition() *CompiledCursor_Position { if x != nil { return x.Position } return nil } type Cursor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"` App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` } func (x *Cursor) Reset() { *x = Cursor{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Cursor) String() string { return protoimpl.X.MessageStringOf(x) } func (*Cursor) ProtoMessage() {} func (x *Cursor) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Cursor.ProtoReflect.Descriptor instead. func (*Cursor) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{18} } func (x *Cursor) GetCursor() uint64 { if x != nil && x.Cursor != nil { return *x.Cursor } return 0 } func (x *Cursor) GetApp() string { if x != nil && x.App != nil { return *x.App } return "" } type Error struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *Error) Reset() { *x = Error{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Error) String() string { return protoimpl.X.MessageStringOf(x) } func (*Error) ProtoMessage() {} func (x *Error) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Error.ProtoReflect.Descriptor instead. func (*Error) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{19} } type Cost struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *Cost) Reset() { *x = Cost{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Cost) String() string { return protoimpl.X.MessageStringOf(x) } func (*Cost) ProtoMessage() {} func (x *Cost) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 Cost.ProtoReflect.Descriptor instead. func (*Cost) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{20} } func (x *Cost) GetIndexWrites() int32 { if x != nil && x.IndexWrites != nil { return *x.IndexWrites } return 0 } func (x *Cost) GetIndexWriteBytes() int32 { if x != nil && x.IndexWriteBytes != nil { return *x.IndexWriteBytes } return 0 } func (x *Cost) GetEntityWrites() int32 { if x != nil && x.EntityWrites != nil { return *x.EntityWrites } return 0 } func (x *Cost) GetEntityWriteBytes() int32 { if x != nil && x.EntityWriteBytes != nil { return *x.EntityWriteBytes } return 0 } func (x *Cost) GetCommitcost() *Cost_CommitCost { if x != nil { return x.Commitcost } return nil } func (x *Cost) GetApproximateStorageDelta() int32 { if x != nil && x.ApproximateStorageDelta != nil { return *x.ApproximateStorageDelta } return 0 } func (x *Cost) GetIdSequenceUpdates() int32 { if x != nil && x.IdSequenceUpdates != nil { return *x.IdSequenceUpdates } return 0 } type GetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for GetRequest fields. const ( Default_GetRequest_AllowDeferred = bool(false) ) func (x *GetRequest) Reset() { *x = GetRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetRequest) ProtoMessage() {} func (x *GetRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 GetRequest.ProtoReflect.Descriptor instead. func (*GetRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{21} } func (x *GetRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *GetRequest) GetKey() []*Reference { if x != nil { return x.Key } return nil } func (x *GetRequest) GetTransaction() *Transaction { if x != nil { return x.Transaction } return nil } func (x *GetRequest) GetFailoverMs() int64 { if x != nil && x.FailoverMs != nil { return *x.FailoverMs } return 0 } func (x *GetRequest) GetStrong() bool { if x != nil && x.Strong != nil { return *x.Strong } return false } func (x *GetRequest) GetAllowDeferred() bool { if x != nil && x.AllowDeferred != nil { return *x.AllowDeferred } return Default_GetRequest_AllowDeferred } type GetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for GetResponse fields. const ( Default_GetResponse_InOrder = bool(true) ) func (x *GetResponse) Reset() { *x = GetResponse{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetResponse) ProtoMessage() {} func (x *GetResponse) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 GetResponse.ProtoReflect.Descriptor instead. func (*GetResponse) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{22} } func (x *GetResponse) GetEntity() []*GetResponse_Entity { if x != nil { return x.Entity } return nil } func (x *GetResponse) GetDeferred() []*Reference { if x != nil { return x.Deferred } return nil } func (x *GetResponse) GetInOrder() bool { if x != nil && x.InOrder != nil { return *x.InOrder } return Default_GetResponse_InOrder } type PutRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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.v2.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"` } // Default values for PutRequest fields. const ( Default_PutRequest_Trusted = bool(false) Default_PutRequest_Force = bool(false) Default_PutRequest_MarkChanges = bool(false) Default_PutRequest_AutoIdPolicy = PutRequest_CURRENT ) func (x *PutRequest) Reset() { *x = PutRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PutRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*PutRequest) ProtoMessage() {} func (x *PutRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 PutRequest.ProtoReflect.Descriptor instead. func (*PutRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{23} } func (x *PutRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *PutRequest) GetEntity() []*EntityProto { if x != nil { return x.Entity } return nil } func (x *PutRequest) GetTransaction() *Transaction { if x != nil { return x.Transaction } return nil } func (x *PutRequest) GetCompositeIndex() []*CompositeIndex { if x != nil { return x.CompositeIndex } return nil } func (x *PutRequest) GetTrusted() bool { if x != nil && x.Trusted != nil { return *x.Trusted } return Default_PutRequest_Trusted } func (x *PutRequest) GetForce() bool { if x != nil && x.Force != nil { return *x.Force } return Default_PutRequest_Force } func (x *PutRequest) GetMarkChanges() bool { if x != nil && x.MarkChanges != nil { return *x.MarkChanges } return Default_PutRequest_MarkChanges } func (x *PutRequest) GetSnapshot() []*Snapshot { if x != nil { return x.Snapshot } return nil } func (x *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy { if x != nil && x.AutoIdPolicy != nil { return *x.AutoIdPolicy } return Default_PutRequest_AutoIdPolicy } type PutResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *PutResponse) Reset() { *x = PutResponse{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PutResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*PutResponse) ProtoMessage() {} func (x *PutResponse) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 PutResponse.ProtoReflect.Descriptor instead. func (*PutResponse) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{24} } func (x *PutResponse) GetKey() []*Reference { if x != nil { return x.Key } return nil } func (x *PutResponse) GetCost() *Cost { if x != nil { return x.Cost } return nil } func (x *PutResponse) GetVersion() []int64 { if x != nil { return x.Version } return nil } type TouchRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for TouchRequest fields. const ( Default_TouchRequest_Force = bool(false) ) func (x *TouchRequest) Reset() { *x = TouchRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TouchRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TouchRequest) ProtoMessage() {} func (x *TouchRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 TouchRequest.ProtoReflect.Descriptor instead. func (*TouchRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{25} } func (x *TouchRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *TouchRequest) GetKey() []*Reference { if x != nil { return x.Key } return nil } func (x *TouchRequest) GetCompositeIndex() []*CompositeIndex { if x != nil { return x.CompositeIndex } return nil } func (x *TouchRequest) GetForce() bool { if x != nil && x.Force != nil { return *x.Force } return Default_TouchRequest_Force } func (x *TouchRequest) GetSnapshot() []*Snapshot { if x != nil { return x.Snapshot } return nil } type TouchResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` } func (x *TouchResponse) Reset() { *x = TouchResponse{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TouchResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TouchResponse) ProtoMessage() {} func (x *TouchResponse) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_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 TouchResponse.ProtoReflect.Descriptor instead. func (*TouchResponse) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{26} } func (x *TouchResponse) GetCost() *Cost { if x != nil { return x.Cost } return nil } type DeleteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for DeleteRequest fields. const ( Default_DeleteRequest_Trusted = bool(false) Default_DeleteRequest_Force = bool(false) Default_DeleteRequest_MarkChanges = bool(false) ) func (x *DeleteRequest) Reset() { *x = DeleteRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteRequest) ProtoMessage() {} func (x *DeleteRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. func (*DeleteRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{27} } func (x *DeleteRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *DeleteRequest) GetKey() []*Reference { if x != nil { return x.Key } return nil } func (x *DeleteRequest) GetTransaction() *Transaction { if x != nil { return x.Transaction } return nil } func (x *DeleteRequest) GetTrusted() bool { if x != nil && x.Trusted != nil { return *x.Trusted } return Default_DeleteRequest_Trusted } func (x *DeleteRequest) GetForce() bool { if x != nil && x.Force != nil { return *x.Force } return Default_DeleteRequest_Force } func (x *DeleteRequest) GetMarkChanges() bool { if x != nil && x.MarkChanges != nil { return *x.MarkChanges } return Default_DeleteRequest_MarkChanges } func (x *DeleteRequest) GetSnapshot() []*Snapshot { if x != nil { return x.Snapshot } return nil } type DeleteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` } func (x *DeleteResponse) Reset() { *x = DeleteResponse{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteResponse) ProtoMessage() {} func (x *DeleteResponse) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. func (*DeleteResponse) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{28} } func (x *DeleteResponse) GetCost() *Cost { if x != nil { return x.Cost } return nil } func (x *DeleteResponse) GetVersion() []int64 { if x != nil { return x.Version } return nil } type NextRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for NextRequest fields. const ( Default_NextRequest_Offset = int32(0) Default_NextRequest_Compile = bool(false) ) func (x *NextRequest) Reset() { *x = NextRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *NextRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*NextRequest) ProtoMessage() {} func (x *NextRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use NextRequest.ProtoReflect.Descriptor instead. func (*NextRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{29} } func (x *NextRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *NextRequest) GetCursor() *Cursor { if x != nil { return x.Cursor } return nil } func (x *NextRequest) GetCount() int32 { if x != nil && x.Count != nil { return *x.Count } return 0 } func (x *NextRequest) GetOffset() int32 { if x != nil && x.Offset != nil { return *x.Offset } return Default_NextRequest_Offset } func (x *NextRequest) GetCompile() bool { if x != nil && x.Compile != nil { return *x.Compile } return Default_NextRequest_Compile } type QueryResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *QueryResult) Reset() { *x = QueryResult{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryResult) ProtoMessage() {} func (x *QueryResult) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use QueryResult.ProtoReflect.Descriptor instead. func (*QueryResult) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{30} } func (x *QueryResult) GetCursor() *Cursor { if x != nil { return x.Cursor } return nil } func (x *QueryResult) GetResult() []*EntityProto { if x != nil { return x.Result } return nil } func (x *QueryResult) GetSkippedResults() int32 { if x != nil && x.SkippedResults != nil { return *x.SkippedResults } return 0 } func (x *QueryResult) GetMoreResults() bool { if x != nil && x.MoreResults != nil { return *x.MoreResults } return false } func (x *QueryResult) GetKeysOnly() bool { if x != nil && x.KeysOnly != nil { return *x.KeysOnly } return false } func (x *QueryResult) GetIndexOnly() bool { if x != nil && x.IndexOnly != nil { return *x.IndexOnly } return false } func (x *QueryResult) GetSmallOps() bool { if x != nil && x.SmallOps != nil { return *x.SmallOps } return false } func (x *QueryResult) GetCompiledQuery() *CompiledQuery { if x != nil { return x.CompiledQuery } return nil } func (x *QueryResult) GetCompiledCursor() *CompiledCursor { if x != nil { return x.CompiledCursor } return nil } func (x *QueryResult) GetIndex() []*CompositeIndex { if x != nil { return x.Index } return nil } func (x *QueryResult) GetVersion() []int64 { if x != nil { return x.Version } return nil } type AllocateIdsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *AllocateIdsRequest) Reset() { *x = AllocateIdsRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AllocateIdsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*AllocateIdsRequest) ProtoMessage() {} func (x *AllocateIdsRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AllocateIdsRequest.ProtoReflect.Descriptor instead. func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{31} } func (x *AllocateIdsRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *AllocateIdsRequest) GetModelKey() *Reference { if x != nil { return x.ModelKey } return nil } func (x *AllocateIdsRequest) GetSize() int64 { if x != nil && x.Size != nil { return *x.Size } return 0 } func (x *AllocateIdsRequest) GetMax() int64 { if x != nil && x.Max != nil { return *x.Max } return 0 } func (x *AllocateIdsRequest) GetReserve() []*Reference { if x != nil { return x.Reserve } return nil } type AllocateIdsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *AllocateIdsResponse) Reset() { *x = AllocateIdsResponse{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AllocateIdsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*AllocateIdsResponse) ProtoMessage() {} func (x *AllocateIdsResponse) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AllocateIdsResponse.ProtoReflect.Descriptor instead. func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{32} } func (x *AllocateIdsResponse) GetStart() int64 { if x != nil && x.Start != nil { return *x.Start } return 0 } func (x *AllocateIdsResponse) GetEnd() int64 { if x != nil && x.End != nil { return *x.End } return 0 } func (x *AllocateIdsResponse) GetCost() *Cost { if x != nil { return x.Cost } return nil } type CompositeIndices struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"` } func (x *CompositeIndices) Reset() { *x = CompositeIndices{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompositeIndices) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompositeIndices) ProtoMessage() {} func (x *CompositeIndices) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CompositeIndices.ProtoReflect.Descriptor instead. func (*CompositeIndices) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{33} } func (x *CompositeIndices) GetIndex() []*CompositeIndex { if x != nil { return x.Index } return nil } type AddActionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *AddActionsRequest) Reset() { *x = AddActionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AddActionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*AddActionsRequest) ProtoMessage() {} func (x *AddActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AddActionsRequest.ProtoReflect.Descriptor instead. func (*AddActionsRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{34} } func (x *AddActionsRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *AddActionsRequest) GetTransaction() *Transaction { if x != nil { return x.Transaction } return nil } func (x *AddActionsRequest) GetAction() []*Action { if x != nil { return x.Action } return nil } type AddActionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *AddActionsResponse) Reset() { *x = AddActionsResponse{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AddActionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*AddActionsResponse) ProtoMessage() {} func (x *AddActionsResponse) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AddActionsResponse.ProtoReflect.Descriptor instead. func (*AddActionsResponse) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{35} } type BeginTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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.v2.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"` PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"` } // Default values for BeginTransactionRequest fields. const ( Default_BeginTransactionRequest_AllowMultipleEg = bool(false) Default_BeginTransactionRequest_Mode = BeginTransactionRequest_UNKNOWN ) func (x *BeginTransactionRequest) Reset() { *x = BeginTransactionRequest{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *BeginTransactionRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*BeginTransactionRequest) ProtoMessage() {} func (x *BeginTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[36] 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 BeginTransactionRequest.ProtoReflect.Descriptor instead. func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{36} } func (x *BeginTransactionRequest) GetHeader() *InternalHeader { if x != nil { return x.Header } return nil } func (x *BeginTransactionRequest) GetApp() string { if x != nil && x.App != nil { return *x.App } return "" } func (x *BeginTransactionRequest) GetAllowMultipleEg() bool { if x != nil && x.AllowMultipleEg != nil { return *x.AllowMultipleEg } return Default_BeginTransactionRequest_AllowMultipleEg } func (x *BeginTransactionRequest) GetDatabaseId() string { if x != nil && x.DatabaseId != nil { return *x.DatabaseId } return "" } func (x *BeginTransactionRequest) GetMode() BeginTransactionRequest_TransactionMode { if x != nil && x.Mode != nil { return *x.Mode } return Default_BeginTransactionRequest_Mode } func (x *BeginTransactionRequest) GetPreviousTransaction() *Transaction { if x != nil { return x.PreviousTransaction } return nil } type CommitResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *CommitResponse) Reset() { *x = CommitResponse{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CommitResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CommitResponse) ProtoMessage() {} func (x *CommitResponse) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[37] 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 CommitResponse.ProtoReflect.Descriptor instead. func (*CommitResponse) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{37} } func (x *CommitResponse) GetCost() *Cost { if x != nil { return x.Cost } return nil } func (x *CommitResponse) GetVersion() []*CommitResponse_Version { if x != nil { return x.Version } return nil } type PropertyValue_PointValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"` Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"` } func (x *PropertyValue_PointValue) Reset() { *x = PropertyValue_PointValue{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PropertyValue_PointValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*PropertyValue_PointValue) ProtoMessage() {} func (x *PropertyValue_PointValue) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[38] 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 PropertyValue_PointValue.ProtoReflect.Descriptor instead. func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{1, 0} } func (x *PropertyValue_PointValue) GetX() float64 { if x != nil && x.X != nil { return *x.X } return 0 } func (x *PropertyValue_PointValue) GetY() float64 { if x != nil && x.Y != nil { return *x.Y } return 0 } type PropertyValue_UserValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *PropertyValue_UserValue) Reset() { *x = PropertyValue_UserValue{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PropertyValue_UserValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*PropertyValue_UserValue) ProtoMessage() {} func (x *PropertyValue_UserValue) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[39] 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 PropertyValue_UserValue.ProtoReflect.Descriptor instead. func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{1, 1} } func (x *PropertyValue_UserValue) GetEmail() string { if x != nil && x.Email != nil { return *x.Email } return "" } func (x *PropertyValue_UserValue) GetAuthDomain() string { if x != nil && x.AuthDomain != nil { return *x.AuthDomain } return "" } func (x *PropertyValue_UserValue) GetNickname() string { if x != nil && x.Nickname != nil { return *x.Nickname } return "" } func (x *PropertyValue_UserValue) GetFederatedIdentity() string { if x != nil && x.FederatedIdentity != nil { return *x.FederatedIdentity } return "" } func (x *PropertyValue_UserValue) GetFederatedProvider() string { if x != nil && x.FederatedProvider != nil { return *x.FederatedProvider } return "" } type PropertyValue_ReferenceValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *PropertyValue_ReferenceValue) Reset() { *x = PropertyValue_ReferenceValue{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PropertyValue_ReferenceValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*PropertyValue_ReferenceValue) ProtoMessage() {} func (x *PropertyValue_ReferenceValue) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[40] 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 PropertyValue_ReferenceValue.ProtoReflect.Descriptor instead. func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{1, 2} } func (x *PropertyValue_ReferenceValue) GetApp() string { if x != nil && x.App != nil { return *x.App } return "" } func (x *PropertyValue_ReferenceValue) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return "" } func (x *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_ReferenceValue_PathElement { if x != nil { return x.Pathelement } return nil } type PropertyValue_ReferenceValue_PathElement struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *PropertyValue_ReferenceValue_PathElement) Reset() { *x = PropertyValue_ReferenceValue_PathElement{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PropertyValue_ReferenceValue_PathElement) String() string { return protoimpl.X.MessageStringOf(x) } func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {} func (x *PropertyValue_ReferenceValue_PathElement) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[41] 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 PropertyValue_ReferenceValue_PathElement.ProtoReflect.Descriptor instead. func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{1, 2, 0} } func (x *PropertyValue_ReferenceValue_PathElement) GetType() string { if x != nil && x.Type != nil { return *x.Type } return "" } func (x *PropertyValue_ReferenceValue_PathElement) GetId() int64 { if x != nil && x.Id != nil { return *x.Id } return 0 } func (x *PropertyValue_ReferenceValue_PathElement) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } type Path_Element struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *Path_Element) Reset() { *x = Path_Element{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Path_Element) String() string { return protoimpl.X.MessageStringOf(x) } func (*Path_Element) ProtoMessage() {} func (x *Path_Element) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[42] 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 Path_Element.ProtoReflect.Descriptor instead. func (*Path_Element) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{3, 0} } func (x *Path_Element) GetType() string { if x != nil && x.Type != nil { return *x.Type } return "" } func (x *Path_Element) GetId() int64 { if x != nil && x.Id != nil { return *x.Id } return 0 } func (x *Path_Element) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } type Index_Property struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.v2.Index_Property_Direction,def=1" json:"direction,omitempty"` } // Default values for Index_Property fields. const ( Default_Index_Property_Direction = Index_Property_ASCENDING ) func (x *Index_Property) Reset() { *x = Index_Property{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Index_Property) String() string { return protoimpl.X.MessageStringOf(x) } func (*Index_Property) ProtoMessage() {} func (x *Index_Property) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[43] 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 Index_Property.ProtoReflect.Descriptor instead. func (*Index_Property) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{8, 0} } func (x *Index_Property) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *Index_Property) GetDirection() Index_Property_Direction { if x != nil && x.Direction != nil { return *x.Direction } return Default_Index_Property_Direction } type IndexPostfix_IndexValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *IndexPostfix_IndexValue) Reset() { *x = IndexPostfix_IndexValue{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexPostfix_IndexValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexPostfix_IndexValue) ProtoMessage() {} func (x *IndexPostfix_IndexValue) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[44] 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 IndexPostfix_IndexValue.ProtoReflect.Descriptor instead. func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{10, 0} } func (x *IndexPostfix_IndexValue) GetPropertyName() string { if x != nil && x.PropertyName != nil { return *x.PropertyName } return "" } func (x *IndexPostfix_IndexValue) GetValue() *PropertyValue { if x != nil { return x.Value } return nil } type Query_Filter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.v2.Query_Filter_Operator" json:"op,omitempty"` Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` } func (x *Query_Filter) Reset() { *x = Query_Filter{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Query_Filter) String() string { return protoimpl.X.MessageStringOf(x) } func (*Query_Filter) ProtoMessage() {} func (x *Query_Filter) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[45] 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 Query_Filter.ProtoReflect.Descriptor instead. func (*Query_Filter) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{15, 0} } func (x *Query_Filter) GetOp() Query_Filter_Operator { if x != nil && x.Op != nil { return *x.Op } return Query_Filter_LESS_THAN } func (x *Query_Filter) GetProperty() []*Property { if x != nil { return x.Property } return nil } type Query_Order struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"` Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.v2.Query_Order_Direction,def=1" json:"direction,omitempty"` } // Default values for Query_Order fields. const ( Default_Query_Order_Direction = Query_Order_ASCENDING ) func (x *Query_Order) Reset() { *x = Query_Order{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Query_Order) String() string { return protoimpl.X.MessageStringOf(x) } func (*Query_Order) ProtoMessage() {} func (x *Query_Order) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[46] 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 Query_Order.ProtoReflect.Descriptor instead. func (*Query_Order) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{15, 1} } func (x *Query_Order) GetProperty() string { if x != nil && x.Property != nil { return *x.Property } return "" } func (x *Query_Order) GetDirection() Query_Order_Direction { if x != nil && x.Direction != nil { return *x.Direction } return Default_Query_Order_Direction } type CompiledQuery_PrimaryScan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *CompiledQuery_PrimaryScan) Reset() { *x = CompiledQuery_PrimaryScan{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompiledQuery_PrimaryScan) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompiledQuery_PrimaryScan) ProtoMessage() {} func (x *CompiledQuery_PrimaryScan) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[47] 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 CompiledQuery_PrimaryScan.ProtoReflect.Descriptor instead. func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{16, 0} } func (x *CompiledQuery_PrimaryScan) GetIndexName() string { if x != nil && x.IndexName != nil { return *x.IndexName } return "" } func (x *CompiledQuery_PrimaryScan) GetStartKey() string { if x != nil && x.StartKey != nil { return *x.StartKey } return "" } func (x *CompiledQuery_PrimaryScan) GetStartInclusive() bool { if x != nil && x.StartInclusive != nil { return *x.StartInclusive } return false } func (x *CompiledQuery_PrimaryScan) GetEndKey() string { if x != nil && x.EndKey != nil { return *x.EndKey } return "" } func (x *CompiledQuery_PrimaryScan) GetEndInclusive() bool { if x != nil && x.EndInclusive != nil { return *x.EndInclusive } return false } func (x *CompiledQuery_PrimaryScan) GetStartPostfixValue() []string { if x != nil { return x.StartPostfixValue } return nil } func (x *CompiledQuery_PrimaryScan) GetEndPostfixValue() []string { if x != nil { return x.EndPostfixValue } return nil } func (x *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 { if x != nil && x.EndUnappliedLogTimestampUs != nil { return *x.EndUnappliedLogTimestampUs } return 0 } type CompiledQuery_MergeJoinScan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for CompiledQuery_MergeJoinScan fields. const ( Default_CompiledQuery_MergeJoinScan_ValuePrefix = bool(false) ) func (x *CompiledQuery_MergeJoinScan) Reset() { *x = CompiledQuery_MergeJoinScan{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompiledQuery_MergeJoinScan) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} func (x *CompiledQuery_MergeJoinScan) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[48] 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 CompiledQuery_MergeJoinScan.ProtoReflect.Descriptor instead. func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{16, 1} } func (x *CompiledQuery_MergeJoinScan) GetIndexName() string { if x != nil && x.IndexName != nil { return *x.IndexName } return "" } func (x *CompiledQuery_MergeJoinScan) GetPrefixValue() []string { if x != nil { return x.PrefixValue } return nil } func (x *CompiledQuery_MergeJoinScan) GetValuePrefix() bool { if x != nil && x.ValuePrefix != nil { return *x.ValuePrefix } return Default_CompiledQuery_MergeJoinScan_ValuePrefix } type CompiledQuery_EntityFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for CompiledQuery_EntityFilter fields. const ( Default_CompiledQuery_EntityFilter_Distinct = bool(false) ) func (x *CompiledQuery_EntityFilter) Reset() { *x = CompiledQuery_EntityFilter{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompiledQuery_EntityFilter) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompiledQuery_EntityFilter) ProtoMessage() {} func (x *CompiledQuery_EntityFilter) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[49] 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 CompiledQuery_EntityFilter.ProtoReflect.Descriptor instead. func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{16, 2} } func (x *CompiledQuery_EntityFilter) GetDistinct() bool { if x != nil && x.Distinct != nil { return *x.Distinct } return Default_CompiledQuery_EntityFilter_Distinct } func (x *CompiledQuery_EntityFilter) GetKind() string { if x != nil && x.Kind != nil { return *x.Kind } return "" } func (x *CompiledQuery_EntityFilter) GetAncestor() *Reference { if x != nil { return x.Ancestor } return nil } type CompiledCursor_Position struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for CompiledCursor_Position fields. const ( Default_CompiledCursor_Position_StartInclusive = bool(true) ) func (x *CompiledCursor_Position) Reset() { *x = CompiledCursor_Position{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompiledCursor_Position) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompiledCursor_Position) ProtoMessage() {} func (x *CompiledCursor_Position) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[50] 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 CompiledCursor_Position.ProtoReflect.Descriptor instead. func (*CompiledCursor_Position) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{17, 0} } func (x *CompiledCursor_Position) GetStartKey() string { if x != nil && x.StartKey != nil { return *x.StartKey } return "" } func (x *CompiledCursor_Position) GetIndexvalue() []*CompiledCursor_Position_IndexValue { if x != nil { return x.Indexvalue } return nil } func (x *CompiledCursor_Position) GetKey() *Reference { if x != nil { return x.Key } return nil } func (x *CompiledCursor_Position) GetStartInclusive() bool { if x != nil && x.StartInclusive != nil { return *x.StartInclusive } return Default_CompiledCursor_Position_StartInclusive } type CompiledCursor_Position_IndexValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"` Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"` } func (x *CompiledCursor_Position_IndexValue) Reset() { *x = CompiledCursor_Position_IndexValue{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompiledCursor_Position_IndexValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompiledCursor_Position_IndexValue) ProtoMessage() {} func (x *CompiledCursor_Position_IndexValue) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[51] 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 CompiledCursor_Position_IndexValue.ProtoReflect.Descriptor instead. func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{17, 0, 0} } func (x *CompiledCursor_Position_IndexValue) GetProperty() string { if x != nil && x.Property != nil { return *x.Property } return "" } func (x *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue { if x != nil { return x.Value } return nil } type Cost_CommitCost struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *Cost_CommitCost) Reset() { *x = Cost_CommitCost{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Cost_CommitCost) String() string { return protoimpl.X.MessageStringOf(x) } func (*Cost_CommitCost) ProtoMessage() {} func (x *Cost_CommitCost) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[52] 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 Cost_CommitCost.ProtoReflect.Descriptor instead. func (*Cost_CommitCost) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{20, 0} } func (x *Cost_CommitCost) GetRequestedEntityPuts() int32 { if x != nil && x.RequestedEntityPuts != nil { return *x.RequestedEntityPuts } return 0 } func (x *Cost_CommitCost) GetRequestedEntityDeletes() int32 { if x != nil && x.RequestedEntityDeletes != nil { return *x.RequestedEntityDeletes } return 0 } type GetResponse_Entity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *GetResponse_Entity) Reset() { *x = GetResponse_Entity{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetResponse_Entity) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetResponse_Entity) ProtoMessage() {} func (x *GetResponse_Entity) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[53] 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 GetResponse_Entity.ProtoReflect.Descriptor instead. func (*GetResponse_Entity) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{22, 0} } func (x *GetResponse_Entity) GetEntity() *EntityProto { if x != nil { return x.Entity } return nil } func (x *GetResponse_Entity) GetKey() *Reference { if x != nil { return x.Key } return nil } func (x *GetResponse_Entity) GetVersion() int64 { if x != nil && x.Version != nil { return *x.Version } return 0 } type CommitResponse_Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *CommitResponse_Version) Reset() { *x = CommitResponse_Version{} if protoimpl.UnsafeEnabled { mi := &file_datastore_v3_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CommitResponse_Version) String() string { return protoimpl.X.MessageStringOf(x) } func (*CommitResponse_Version) ProtoMessage() {} func (x *CommitResponse_Version) ProtoReflect() protoreflect.Message { mi := &file_datastore_v3_proto_msgTypes[54] 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 CommitResponse_Version.ProtoReflect.Descriptor instead. func (*CommitResponse_Version) Descriptor() ([]byte, []int) { return file_datastore_v3_proto_rawDescGZIP(), []int{37, 0} } func (x *CommitResponse_Version) GetRootEntityKey() *Reference { if x != nil { return x.RootEntityKey } return nil } func (x *CommitResponse_Version) GetVersion() int64 { if x != nil && x.Version != nil { return *x.Version } return 0 } var File_datastore_v3_proto protoreflect.FileDescriptor var file_datastore_v3_proto_rawDesc = []byte{ 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0x08, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc6, 0x06, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x52, 0x0a, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x2a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x28, 0x0a, 0x0a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x06, 0x20, 0x02, 0x28, 0x01, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x07, 0x20, 0x02, 0x28, 0x01, 0x52, 0x01, 0x79, 0x1a, 0xbc, 0x01, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x09, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x12, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x1a, 0xe2, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x0d, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x36, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x45, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf2, 0x05, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x07, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x4d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x4e, 0x4f, 0x5f, 0x4d, 0x45, 0x41, 0x4e, 0x49, 0x4e, 0x47, 0x52, 0x07, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x55, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x66, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x46, 0x74, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x66, 0x74, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x02, 0x65, 0x6e, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x22, 0xc5, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x5f, 0x4d, 0x45, 0x41, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x0f, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x59, 0x54, 0x45, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x54, 0x4f, 0x4d, 0x5f, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x54, 0x4f, 0x4d, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x54, 0x4f, 0x4d, 0x5f, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x54, 0x4f, 0x4d, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x54, 0x4f, 0x4d, 0x5f, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x44, 0x5f, 0x57, 0x48, 0x45, 0x4e, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x44, 0x5f, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x45, 0x4f, 0x52, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x09, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x44, 0x5f, 0x49, 0x4d, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x44, 0x5f, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x44, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x41, 0x4c, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, 0x0c, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x44, 0x5f, 0x52, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x11, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x13, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x12, 0x22, 0x2b, 0x0a, 0x15, 0x46, 0x74, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x4d, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x54, 0x4f, 0x4d, 0x10, 0x02, 0x22, 0x7f, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x41, 0x0a, 0x07, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x0d, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xb7, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x12, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0xa1, 0x03, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x10, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x69, 0x6e, 0x64, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x69, 0x6e, 0x64, 0x55, 0x72, 0x69, 0x12, 0x32, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0c, 0x72, 0x61, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x34, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x44, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x22, 0x44, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9c, 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x02, 0x28, 0x08, 0x52, 0x08, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x9b, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x9f, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x14, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x66, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6f, 0x6e, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x49, 0x66, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3f, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x22, 0x85, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x6f, 0x73, 0x74, 0x66, 0x69, 0x78, 0x12, 0x46, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x6f, 0x73, 0x74, 0x66, 0x69, 0x78, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x1a, 0x64, 0x0a, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3f, 0x0a, 0x0d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x22, 0x3e, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x74, 0x73, 0x22, 0x22, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x22, 0x22, 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x71, 0x6f, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x06, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x28, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xd9, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x13, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x11, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x50, 0x65, 0x72, 0x66, 0x65, 0x63, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x22, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x6d, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x21, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x53, 0x61, 0x66, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x24, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x25, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x1a, 0xf0, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x32, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x7d, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x05, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x4e, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x07, 0x1a, 0x9d, 0x01, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x4c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x3d, 0x0a, 0x04, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x03, 0x22, 0x9a, 0x08, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x73, 0x63, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0a, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x73, 0x63, 0x61, 0x6e, 0x12, 0x4f, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x73, 0x63, 0x61, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x29, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x73, 0x63, 0x61, 0x6e, 0x12, 0x30, 0x0a, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x65, 0x66, 0x12, 0x19, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x69, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x69, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x28, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0xd0, 0x02, 0x0a, 0x0b, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x63, 0x61, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x66, 0x69, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x66, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x66, 0x69, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x66, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x42, 0x0a, 0x1e, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x75, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x55, 0x73, 0x1a, 0x7b, 0x0a, 0x0d, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x53, 0x63, 0x61, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x7a, 0x0a, 0x0c, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, 0x86, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xb0, 0x02, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x30, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0x5b, 0x0a, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1f, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x32, 0x0a, 0x06, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x06, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x22, 0x8b, 0x02, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x81, 0x02, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x41, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x45, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x49, 0x47, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x07, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x5f, 0x42, 0x55, 0x54, 0x5f, 0x53, 0x54, 0x49, 0x4c, 0x4c, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x4c, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x41, 0x46, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4f, 0x4c, 0x44, 0x10, 0x0b, 0x22, 0xcf, 0x03, 0x0a, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x69, 0x64, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x7a, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x75, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x22, 0xa0, 0x02, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x69, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x80, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x04, 0x0a, 0x0a, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x07, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x07, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x54, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x07, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x54, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x49, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2b, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x10, 0x01, 0x22, 0x7a, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x87, 0x02, 0x0a, 0x0c, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x37, 0x0a, 0x0d, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x22, 0xc9, 0x02, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x07, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x07, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x52, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc3, 0x01, 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x22, 0xec, 0x03, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x6d, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x6f, 0x70, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x22, 0x65, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb4, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, 0x03, 0x0a, 0x17, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x31, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x65, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x45, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x52, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3d, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x64, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x72, 0x6f, 0x6f, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, } var ( file_datastore_v3_proto_rawDescOnce sync.Once file_datastore_v3_proto_rawDescData = file_datastore_v3_proto_rawDesc ) func file_datastore_v3_proto_rawDescGZIP() []byte { file_datastore_v3_proto_rawDescOnce.Do(func() { file_datastore_v3_proto_rawDescData = protoimpl.X.CompressGZIP(file_datastore_v3_proto_rawDescData) }) return file_datastore_v3_proto_rawDescData } var file_datastore_v3_proto_enumTypes = make([]protoimpl.EnumInfo, 12) var file_datastore_v3_proto_msgTypes = make([]protoimpl.MessageInfo, 55) var file_datastore_v3_proto_goTypes = []interface{}{ (Property_Meaning)(0), // 0: appengine.v2.Property.Meaning (Property_FtsTokenizationOption)(0), // 1: appengine.v2.Property.FtsTokenizationOption (EntityProto_Kind)(0), // 2: appengine.v2.EntityProto.Kind (Index_Property_Direction)(0), // 3: appengine.v2.Index.Property.Direction (CompositeIndex_State)(0), // 4: appengine.v2.CompositeIndex.State (Snapshot_Status)(0), // 5: appengine.v2.Snapshot.Status (Query_Hint)(0), // 6: appengine.v2.Query.Hint (Query_Filter_Operator)(0), // 7: appengine.v2.Query.Filter.Operator (Query_Order_Direction)(0), // 8: appengine.v2.Query.Order.Direction (Error_ErrorCode)(0), // 9: appengine.v2.Error.ErrorCode (PutRequest_AutoIdPolicy)(0), // 10: appengine.v2.PutRequest.AutoIdPolicy (BeginTransactionRequest_TransactionMode)(0), // 11: appengine.v2.BeginTransactionRequest.TransactionMode (*Action)(nil), // 12: appengine.v2.Action (*PropertyValue)(nil), // 13: appengine.v2.PropertyValue (*Property)(nil), // 14: appengine.v2.Property (*Path)(nil), // 15: appengine.v2.Path (*Reference)(nil), // 16: appengine.v2.Reference (*User)(nil), // 17: appengine.v2.User (*EntityProto)(nil), // 18: appengine.v2.EntityProto (*CompositeProperty)(nil), // 19: appengine.v2.CompositeProperty (*Index)(nil), // 20: appengine.v2.Index (*CompositeIndex)(nil), // 21: appengine.v2.CompositeIndex (*IndexPostfix)(nil), // 22: appengine.v2.IndexPostfix (*IndexPosition)(nil), // 23: appengine.v2.IndexPosition (*Snapshot)(nil), // 24: appengine.v2.Snapshot (*InternalHeader)(nil), // 25: appengine.v2.InternalHeader (*Transaction)(nil), // 26: appengine.v2.Transaction (*Query)(nil), // 27: appengine.v2.Query (*CompiledQuery)(nil), // 28: appengine.v2.CompiledQuery (*CompiledCursor)(nil), // 29: appengine.v2.CompiledCursor (*Cursor)(nil), // 30: appengine.v2.Cursor (*Error)(nil), // 31: appengine.v2.Error (*Cost)(nil), // 32: appengine.v2.Cost (*GetRequest)(nil), // 33: appengine.v2.GetRequest (*GetResponse)(nil), // 34: appengine.v2.GetResponse (*PutRequest)(nil), // 35: appengine.v2.PutRequest (*PutResponse)(nil), // 36: appengine.v2.PutResponse (*TouchRequest)(nil), // 37: appengine.v2.TouchRequest (*TouchResponse)(nil), // 38: appengine.v2.TouchResponse (*DeleteRequest)(nil), // 39: appengine.v2.DeleteRequest (*DeleteResponse)(nil), // 40: appengine.v2.DeleteResponse (*NextRequest)(nil), // 41: appengine.v2.NextRequest (*QueryResult)(nil), // 42: appengine.v2.QueryResult (*AllocateIdsRequest)(nil), // 43: appengine.v2.AllocateIdsRequest (*AllocateIdsResponse)(nil), // 44: appengine.v2.AllocateIdsResponse (*CompositeIndices)(nil), // 45: appengine.v2.CompositeIndices (*AddActionsRequest)(nil), // 46: appengine.v2.AddActionsRequest (*AddActionsResponse)(nil), // 47: appengine.v2.AddActionsResponse (*BeginTransactionRequest)(nil), // 48: appengine.v2.BeginTransactionRequest (*CommitResponse)(nil), // 49: appengine.v2.CommitResponse (*PropertyValue_PointValue)(nil), // 50: appengine.v2.PropertyValue.PointValue (*PropertyValue_UserValue)(nil), // 51: appengine.v2.PropertyValue.UserValue (*PropertyValue_ReferenceValue)(nil), // 52: appengine.v2.PropertyValue.ReferenceValue (*PropertyValue_ReferenceValue_PathElement)(nil), // 53: appengine.v2.PropertyValue.ReferenceValue.PathElement (*Path_Element)(nil), // 54: appengine.v2.Path.Element (*Index_Property)(nil), // 55: appengine.v2.Index.Property (*IndexPostfix_IndexValue)(nil), // 56: appengine.v2.IndexPostfix.IndexValue (*Query_Filter)(nil), // 57: appengine.v2.Query.Filter (*Query_Order)(nil), // 58: appengine.v2.Query.Order (*CompiledQuery_PrimaryScan)(nil), // 59: appengine.v2.CompiledQuery.PrimaryScan (*CompiledQuery_MergeJoinScan)(nil), // 60: appengine.v2.CompiledQuery.MergeJoinScan (*CompiledQuery_EntityFilter)(nil), // 61: appengine.v2.CompiledQuery.EntityFilter (*CompiledCursor_Position)(nil), // 62: appengine.v2.CompiledCursor.Position (*CompiledCursor_Position_IndexValue)(nil), // 63: appengine.v2.CompiledCursor.Position.IndexValue (*Cost_CommitCost)(nil), // 64: appengine.v2.Cost.CommitCost (*GetResponse_Entity)(nil), // 65: appengine.v2.GetResponse.Entity (*CommitResponse_Version)(nil), // 66: appengine.v2.CommitResponse.Version } var file_datastore_v3_proto_depIdxs = []int32{ 50, // 0: appengine.v2.PropertyValue.pointvalue:type_name -> appengine.v2.PropertyValue.PointValue 51, // 1: appengine.v2.PropertyValue.uservalue:type_name -> appengine.v2.PropertyValue.UserValue 52, // 2: appengine.v2.PropertyValue.referencevalue:type_name -> appengine.v2.PropertyValue.ReferenceValue 0, // 3: appengine.v2.Property.meaning:type_name -> appengine.v2.Property.Meaning 13, // 4: appengine.v2.Property.value:type_name -> appengine.v2.PropertyValue 1, // 5: appengine.v2.Property.fts_tokenization_option:type_name -> appengine.v2.Property.FtsTokenizationOption 54, // 6: appengine.v2.Path.element:type_name -> appengine.v2.Path.Element 15, // 7: appengine.v2.Reference.path:type_name -> appengine.v2.Path 16, // 8: appengine.v2.EntityProto.key:type_name -> appengine.v2.Reference 15, // 9: appengine.v2.EntityProto.entity_group:type_name -> appengine.v2.Path 17, // 10: appengine.v2.EntityProto.owner:type_name -> appengine.v2.User 2, // 11: appengine.v2.EntityProto.kind:type_name -> appengine.v2.EntityProto.Kind 14, // 12: appengine.v2.EntityProto.property:type_name -> appengine.v2.Property 14, // 13: appengine.v2.EntityProto.raw_property:type_name -> appengine.v2.Property 55, // 14: appengine.v2.Index.property:type_name -> appengine.v2.Index.Property 20, // 15: appengine.v2.CompositeIndex.definition:type_name -> appengine.v2.Index 4, // 16: appengine.v2.CompositeIndex.state:type_name -> appengine.v2.CompositeIndex.State 56, // 17: appengine.v2.IndexPostfix.index_value:type_name -> appengine.v2.IndexPostfix.IndexValue 16, // 18: appengine.v2.IndexPostfix.key:type_name -> appengine.v2.Reference 25, // 19: appengine.v2.Transaction.header:type_name -> appengine.v2.InternalHeader 25, // 20: appengine.v2.Query.header:type_name -> appengine.v2.InternalHeader 16, // 21: appengine.v2.Query.ancestor:type_name -> appengine.v2.Reference 57, // 22: appengine.v2.Query.filter:type_name -> appengine.v2.Query.Filter 58, // 23: appengine.v2.Query.order:type_name -> appengine.v2.Query.Order 6, // 24: appengine.v2.Query.hint:type_name -> appengine.v2.Query.Hint 29, // 25: appengine.v2.Query.compiled_cursor:type_name -> appengine.v2.CompiledCursor 29, // 26: appengine.v2.Query.end_compiled_cursor:type_name -> appengine.v2.CompiledCursor 21, // 27: appengine.v2.Query.composite_index:type_name -> appengine.v2.CompositeIndex 26, // 28: appengine.v2.Query.transaction:type_name -> appengine.v2.Transaction 59, // 29: appengine.v2.CompiledQuery.primaryscan:type_name -> appengine.v2.CompiledQuery.PrimaryScan 60, // 30: appengine.v2.CompiledQuery.mergejoinscan:type_name -> appengine.v2.CompiledQuery.MergeJoinScan 20, // 31: appengine.v2.CompiledQuery.index_def:type_name -> appengine.v2.Index 61, // 32: appengine.v2.CompiledQuery.entityfilter:type_name -> appengine.v2.CompiledQuery.EntityFilter 62, // 33: appengine.v2.CompiledCursor.position:type_name -> appengine.v2.CompiledCursor.Position 64, // 34: appengine.v2.Cost.commitcost:type_name -> appengine.v2.Cost.CommitCost 25, // 35: appengine.v2.GetRequest.header:type_name -> appengine.v2.InternalHeader 16, // 36: appengine.v2.GetRequest.key:type_name -> appengine.v2.Reference 26, // 37: appengine.v2.GetRequest.transaction:type_name -> appengine.v2.Transaction 65, // 38: appengine.v2.GetResponse.entity:type_name -> appengine.v2.GetResponse.Entity 16, // 39: appengine.v2.GetResponse.deferred:type_name -> appengine.v2.Reference 25, // 40: appengine.v2.PutRequest.header:type_name -> appengine.v2.InternalHeader 18, // 41: appengine.v2.PutRequest.entity:type_name -> appengine.v2.EntityProto 26, // 42: appengine.v2.PutRequest.transaction:type_name -> appengine.v2.Transaction 21, // 43: appengine.v2.PutRequest.composite_index:type_name -> appengine.v2.CompositeIndex 24, // 44: appengine.v2.PutRequest.snapshot:type_name -> appengine.v2.Snapshot 10, // 45: appengine.v2.PutRequest.auto_id_policy:type_name -> appengine.v2.PutRequest.AutoIdPolicy 16, // 46: appengine.v2.PutResponse.key:type_name -> appengine.v2.Reference 32, // 47: appengine.v2.PutResponse.cost:type_name -> appengine.v2.Cost 25, // 48: appengine.v2.TouchRequest.header:type_name -> appengine.v2.InternalHeader 16, // 49: appengine.v2.TouchRequest.key:type_name -> appengine.v2.Reference 21, // 50: appengine.v2.TouchRequest.composite_index:type_name -> appengine.v2.CompositeIndex 24, // 51: appengine.v2.TouchRequest.snapshot:type_name -> appengine.v2.Snapshot 32, // 52: appengine.v2.TouchResponse.cost:type_name -> appengine.v2.Cost 25, // 53: appengine.v2.DeleteRequest.header:type_name -> appengine.v2.InternalHeader 16, // 54: appengine.v2.DeleteRequest.key:type_name -> appengine.v2.Reference 26, // 55: appengine.v2.DeleteRequest.transaction:type_name -> appengine.v2.Transaction 24, // 56: appengine.v2.DeleteRequest.snapshot:type_name -> appengine.v2.Snapshot 32, // 57: appengine.v2.DeleteResponse.cost:type_name -> appengine.v2.Cost 25, // 58: appengine.v2.NextRequest.header:type_name -> appengine.v2.InternalHeader 30, // 59: appengine.v2.NextRequest.cursor:type_name -> appengine.v2.Cursor 30, // 60: appengine.v2.QueryResult.cursor:type_name -> appengine.v2.Cursor 18, // 61: appengine.v2.QueryResult.result:type_name -> appengine.v2.EntityProto 28, // 62: appengine.v2.QueryResult.compiled_query:type_name -> appengine.v2.CompiledQuery 29, // 63: appengine.v2.QueryResult.compiled_cursor:type_name -> appengine.v2.CompiledCursor 21, // 64: appengine.v2.QueryResult.index:type_name -> appengine.v2.CompositeIndex 25, // 65: appengine.v2.AllocateIdsRequest.header:type_name -> appengine.v2.InternalHeader 16, // 66: appengine.v2.AllocateIdsRequest.model_key:type_name -> appengine.v2.Reference 16, // 67: appengine.v2.AllocateIdsRequest.reserve:type_name -> appengine.v2.Reference 32, // 68: appengine.v2.AllocateIdsResponse.cost:type_name -> appengine.v2.Cost 21, // 69: appengine.v2.CompositeIndices.index:type_name -> appengine.v2.CompositeIndex 25, // 70: appengine.v2.AddActionsRequest.header:type_name -> appengine.v2.InternalHeader 26, // 71: appengine.v2.AddActionsRequest.transaction:type_name -> appengine.v2.Transaction 12, // 72: appengine.v2.AddActionsRequest.action:type_name -> appengine.v2.Action 25, // 73: appengine.v2.BeginTransactionRequest.header:type_name -> appengine.v2.InternalHeader 11, // 74: appengine.v2.BeginTransactionRequest.mode:type_name -> appengine.v2.BeginTransactionRequest.TransactionMode 26, // 75: appengine.v2.BeginTransactionRequest.previous_transaction:type_name -> appengine.v2.Transaction 32, // 76: appengine.v2.CommitResponse.cost:type_name -> appengine.v2.Cost 66, // 77: appengine.v2.CommitResponse.version:type_name -> appengine.v2.CommitResponse.Version 53, // 78: appengine.v2.PropertyValue.ReferenceValue.pathelement:type_name -> appengine.v2.PropertyValue.ReferenceValue.PathElement 3, // 79: appengine.v2.Index.Property.direction:type_name -> appengine.v2.Index.Property.Direction 13, // 80: appengine.v2.IndexPostfix.IndexValue.value:type_name -> appengine.v2.PropertyValue 7, // 81: appengine.v2.Query.Filter.op:type_name -> appengine.v2.Query.Filter.Operator 14, // 82: appengine.v2.Query.Filter.property:type_name -> appengine.v2.Property 8, // 83: appengine.v2.Query.Order.direction:type_name -> appengine.v2.Query.Order.Direction 16, // 84: appengine.v2.CompiledQuery.EntityFilter.ancestor:type_name -> appengine.v2.Reference 63, // 85: appengine.v2.CompiledCursor.Position.indexvalue:type_name -> appengine.v2.CompiledCursor.Position.IndexValue 16, // 86: appengine.v2.CompiledCursor.Position.key:type_name -> appengine.v2.Reference 13, // 87: appengine.v2.CompiledCursor.Position.IndexValue.value:type_name -> appengine.v2.PropertyValue 18, // 88: appengine.v2.GetResponse.Entity.entity:type_name -> appengine.v2.EntityProto 16, // 89: appengine.v2.GetResponse.Entity.key:type_name -> appengine.v2.Reference 16, // 90: appengine.v2.CommitResponse.Version.root_entity_key:type_name -> appengine.v2.Reference 91, // [91:91] is the sub-list for method output_type 91, // [91:91] is the sub-list for method input_type 91, // [91:91] is the sub-list for extension type_name 91, // [91:91] is the sub-list for extension extendee 0, // [0:91] is the sub-list for field type_name } func init() { file_datastore_v3_proto_init() } func file_datastore_v3_proto_init() { if File_datastore_v3_proto != nil { return } if !protoimpl.UnsafeEnabled { file_datastore_v3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Action); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PropertyValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Property); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Path); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Reference); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*User); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EntityProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompositeProperty); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Index); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompositeIndex); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexPostfix); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexPosition); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Snapshot); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InternalHeader); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Transaction); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Query); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompiledQuery); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompiledCursor); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cursor); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Error); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cost); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TouchRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TouchResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NextRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllocateIdsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AllocateIdsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompositeIndices); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddActionsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddActionsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BeginTransactionRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommitResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PropertyValue_PointValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PropertyValue_UserValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PropertyValue_ReferenceValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PropertyValue_ReferenceValue_PathElement); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Path_Element); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Index_Property); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexPostfix_IndexValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Query_Filter); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Query_Order); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompiledQuery_PrimaryScan); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompiledQuery_MergeJoinScan); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompiledQuery_EntityFilter); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompiledCursor_Position); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompiledCursor_Position_IndexValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cost_CommitCost); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetResponse_Entity); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_datastore_v3_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommitResponse_Version); 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_datastore_v3_proto_rawDesc, NumEnums: 12, NumMessages: 55, NumExtensions: 0, NumServices: 0, }, GoTypes: file_datastore_v3_proto_goTypes, DependencyIndexes: file_datastore_v3_proto_depIdxs, EnumInfos: file_datastore_v3_proto_enumTypes, MessageInfos: file_datastore_v3_proto_msgTypes, }.Build() File_datastore_v3_proto = out.File file_datastore_v3_proto_rawDesc = nil file_datastore_v3_proto_goTypes = nil file_datastore_v3_proto_depIdxs = nil }
memcache
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/memcache/memcache_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 // protoc v3.21.8 // source: memcache_service.proto package memcache import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type MemcacheServiceError_ErrorCode int32 const ( MemcacheServiceError_OK MemcacheServiceError_ErrorCode = 0 MemcacheServiceError_UNSPECIFIED_ERROR MemcacheServiceError_ErrorCode = 1 MemcacheServiceError_NAMESPACE_NOT_SET MemcacheServiceError_ErrorCode = 2 MemcacheServiceError_PERMISSION_DENIED MemcacheServiceError_ErrorCode = 3 MemcacheServiceError_INVALID_VALUE MemcacheServiceError_ErrorCode = 6 ) // Enum value maps for MemcacheServiceError_ErrorCode. var ( MemcacheServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "UNSPECIFIED_ERROR", 2: "NAMESPACE_NOT_SET", 3: "PERMISSION_DENIED", 6: "INVALID_VALUE", } MemcacheServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "UNSPECIFIED_ERROR": 1, "NAMESPACE_NOT_SET": 2, "PERMISSION_DENIED": 3, "INVALID_VALUE": 6, } ) func (x MemcacheServiceError_ErrorCode) Enum() *MemcacheServiceError_ErrorCode { p := new(MemcacheServiceError_ErrorCode) *p = x return p } func (x MemcacheServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MemcacheServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_memcache_service_proto_enumTypes[0].Descriptor() } func (MemcacheServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_memcache_service_proto_enumTypes[0] } func (x MemcacheServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MemcacheServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MemcacheServiceError_ErrorCode(num) return nil } // Deprecated: Use MemcacheServiceError_ErrorCode.Descriptor instead. func (MemcacheServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{0, 0} } type MemcacheSetRequest_SetPolicy int32 const ( MemcacheSetRequest_SET MemcacheSetRequest_SetPolicy = 1 MemcacheSetRequest_ADD MemcacheSetRequest_SetPolicy = 2 MemcacheSetRequest_REPLACE MemcacheSetRequest_SetPolicy = 3 MemcacheSetRequest_CAS MemcacheSetRequest_SetPolicy = 4 ) // Enum value maps for MemcacheSetRequest_SetPolicy. var ( MemcacheSetRequest_SetPolicy_name = map[int32]string{ 1: "SET", 2: "ADD", 3: "REPLACE", 4: "CAS", } MemcacheSetRequest_SetPolicy_value = map[string]int32{ "SET": 1, "ADD": 2, "REPLACE": 3, "CAS": 4, } ) func (x MemcacheSetRequest_SetPolicy) Enum() *MemcacheSetRequest_SetPolicy { p := new(MemcacheSetRequest_SetPolicy) *p = x return p } func (x MemcacheSetRequest_SetPolicy) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MemcacheSetRequest_SetPolicy) Descriptor() protoreflect.EnumDescriptor { return file_memcache_service_proto_enumTypes[1].Descriptor() } func (MemcacheSetRequest_SetPolicy) Type() protoreflect.EnumType { return &file_memcache_service_proto_enumTypes[1] } func (x MemcacheSetRequest_SetPolicy) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MemcacheSetRequest_SetPolicy) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MemcacheSetRequest_SetPolicy(num) return nil } // Deprecated: Use MemcacheSetRequest_SetPolicy.Descriptor instead. func (MemcacheSetRequest_SetPolicy) EnumDescriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{5, 0} } type MemcacheSetResponse_SetStatusCode int32 const ( MemcacheSetResponse_STORED MemcacheSetResponse_SetStatusCode = 1 MemcacheSetResponse_NOT_STORED MemcacheSetResponse_SetStatusCode = 2 MemcacheSetResponse_ERROR MemcacheSetResponse_SetStatusCode = 3 MemcacheSetResponse_EXISTS MemcacheSetResponse_SetStatusCode = 4 ) // Enum value maps for MemcacheSetResponse_SetStatusCode. var ( MemcacheSetResponse_SetStatusCode_name = map[int32]string{ 1: "STORED", 2: "NOT_STORED", 3: "ERROR", 4: "EXISTS", } MemcacheSetResponse_SetStatusCode_value = map[string]int32{ "STORED": 1, "NOT_STORED": 2, "ERROR": 3, "EXISTS": 4, } ) func (x MemcacheSetResponse_SetStatusCode) Enum() *MemcacheSetResponse_SetStatusCode { p := new(MemcacheSetResponse_SetStatusCode) *p = x return p } func (x MemcacheSetResponse_SetStatusCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MemcacheSetResponse_SetStatusCode) Descriptor() protoreflect.EnumDescriptor { return file_memcache_service_proto_enumTypes[2].Descriptor() } func (MemcacheSetResponse_SetStatusCode) Type() protoreflect.EnumType { return &file_memcache_service_proto_enumTypes[2] } func (x MemcacheSetResponse_SetStatusCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MemcacheSetResponse_SetStatusCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MemcacheSetResponse_SetStatusCode(num) return nil } // Deprecated: Use MemcacheSetResponse_SetStatusCode.Descriptor instead. func (MemcacheSetResponse_SetStatusCode) EnumDescriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{6, 0} } type MemcacheDeleteResponse_DeleteStatusCode int32 const ( MemcacheDeleteResponse_DELETED MemcacheDeleteResponse_DeleteStatusCode = 1 MemcacheDeleteResponse_NOT_FOUND MemcacheDeleteResponse_DeleteStatusCode = 2 ) // Enum value maps for MemcacheDeleteResponse_DeleteStatusCode. var ( MemcacheDeleteResponse_DeleteStatusCode_name = map[int32]string{ 1: "DELETED", 2: "NOT_FOUND", } MemcacheDeleteResponse_DeleteStatusCode_value = map[string]int32{ "DELETED": 1, "NOT_FOUND": 2, } ) func (x MemcacheDeleteResponse_DeleteStatusCode) Enum() *MemcacheDeleteResponse_DeleteStatusCode { p := new(MemcacheDeleteResponse_DeleteStatusCode) *p = x return p } func (x MemcacheDeleteResponse_DeleteStatusCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MemcacheDeleteResponse_DeleteStatusCode) Descriptor() protoreflect.EnumDescriptor { return file_memcache_service_proto_enumTypes[3].Descriptor() } func (MemcacheDeleteResponse_DeleteStatusCode) Type() protoreflect.EnumType { return &file_memcache_service_proto_enumTypes[3] } func (x MemcacheDeleteResponse_DeleteStatusCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MemcacheDeleteResponse_DeleteStatusCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MemcacheDeleteResponse_DeleteStatusCode(num) return nil } // Deprecated: Use MemcacheDeleteResponse_DeleteStatusCode.Descriptor instead. func (MemcacheDeleteResponse_DeleteStatusCode) EnumDescriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{8, 0} } type MemcacheIncrementRequest_Direction int32 const ( MemcacheIncrementRequest_INCREMENT MemcacheIncrementRequest_Direction = 1 MemcacheIncrementRequest_DECREMENT MemcacheIncrementRequest_Direction = 2 ) // Enum value maps for MemcacheIncrementRequest_Direction. var ( MemcacheIncrementRequest_Direction_name = map[int32]string{ 1: "INCREMENT", 2: "DECREMENT", } MemcacheIncrementRequest_Direction_value = map[string]int32{ "INCREMENT": 1, "DECREMENT": 2, } ) func (x MemcacheIncrementRequest_Direction) Enum() *MemcacheIncrementRequest_Direction { p := new(MemcacheIncrementRequest_Direction) *p = x return p } func (x MemcacheIncrementRequest_Direction) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MemcacheIncrementRequest_Direction) Descriptor() protoreflect.EnumDescriptor { return file_memcache_service_proto_enumTypes[4].Descriptor() } func (MemcacheIncrementRequest_Direction) Type() protoreflect.EnumType { return &file_memcache_service_proto_enumTypes[4] } func (x MemcacheIncrementRequest_Direction) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MemcacheIncrementRequest_Direction) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MemcacheIncrementRequest_Direction(num) return nil } // Deprecated: Use MemcacheIncrementRequest_Direction.Descriptor instead. func (MemcacheIncrementRequest_Direction) EnumDescriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{9, 0} } type MemcacheIncrementResponse_IncrementStatusCode int32 const ( MemcacheIncrementResponse_OK MemcacheIncrementResponse_IncrementStatusCode = 1 MemcacheIncrementResponse_NOT_CHANGED MemcacheIncrementResponse_IncrementStatusCode = 2 MemcacheIncrementResponse_ERROR MemcacheIncrementResponse_IncrementStatusCode = 3 ) // Enum value maps for MemcacheIncrementResponse_IncrementStatusCode. var ( MemcacheIncrementResponse_IncrementStatusCode_name = map[int32]string{ 1: "OK", 2: "NOT_CHANGED", 3: "ERROR", } MemcacheIncrementResponse_IncrementStatusCode_value = map[string]int32{ "OK": 1, "NOT_CHANGED": 2, "ERROR": 3, } ) func (x MemcacheIncrementResponse_IncrementStatusCode) Enum() *MemcacheIncrementResponse_IncrementStatusCode { p := new(MemcacheIncrementResponse_IncrementStatusCode) *p = x return p } func (x MemcacheIncrementResponse_IncrementStatusCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MemcacheIncrementResponse_IncrementStatusCode) Descriptor() protoreflect.EnumDescriptor { return file_memcache_service_proto_enumTypes[5].Descriptor() } func (MemcacheIncrementResponse_IncrementStatusCode) Type() protoreflect.EnumType { return &file_memcache_service_proto_enumTypes[5] } func (x MemcacheIncrementResponse_IncrementStatusCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *MemcacheIncrementResponse_IncrementStatusCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = MemcacheIncrementResponse_IncrementStatusCode(num) return nil } // Deprecated: Use MemcacheIncrementResponse_IncrementStatusCode.Descriptor instead. func (MemcacheIncrementResponse_IncrementStatusCode) EnumDescriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{10, 0} } type MemcacheServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MemcacheServiceError) Reset() { *x = MemcacheServiceError{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheServiceError) ProtoMessage() {} func (x *MemcacheServiceError) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheServiceError.ProtoReflect.Descriptor instead. func (*MemcacheServiceError) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{0} } type AppOverride struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` // Deprecated: Do not use. NumMemcachegBackends *int32 `protobuf:"varint,2,opt,name=num_memcacheg_backends,json=numMemcachegBackends" json:"num_memcacheg_backends,omitempty"` // Deprecated: Do not use. IgnoreShardlock *bool `protobuf:"varint,3,opt,name=ignore_shardlock,json=ignoreShardlock" json:"ignore_shardlock,omitempty"` // Deprecated: Do not use. MemcachePoolHint *string `protobuf:"bytes,4,opt,name=memcache_pool_hint,json=memcachePoolHint" json:"memcache_pool_hint,omitempty"` // Deprecated: Do not use. MemcacheShardingStrategy []byte `protobuf:"bytes,5,opt,name=memcache_sharding_strategy,json=memcacheShardingStrategy" json:"memcache_sharding_strategy,omitempty"` } func (x *AppOverride) Reset() { *x = AppOverride{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AppOverride) String() string { return protoimpl.X.MessageStringOf(x) } func (*AppOverride) ProtoMessage() {} func (x *AppOverride) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 AppOverride.ProtoReflect.Descriptor instead. func (*AppOverride) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{1} } func (x *AppOverride) GetAppId() string { if x != nil && x.AppId != nil { return *x.AppId } return "" } // Deprecated: Do not use. func (x *AppOverride) GetNumMemcachegBackends() int32 { if x != nil && x.NumMemcachegBackends != nil { return *x.NumMemcachegBackends } return 0 } // Deprecated: Do not use. func (x *AppOverride) GetIgnoreShardlock() bool { if x != nil && x.IgnoreShardlock != nil { return *x.IgnoreShardlock } return false } // Deprecated: Do not use. func (x *AppOverride) GetMemcachePoolHint() string { if x != nil && x.MemcachePoolHint != nil { return *x.MemcachePoolHint } return "" } // Deprecated: Do not use. func (x *AppOverride) GetMemcacheShardingStrategy() []byte { if x != nil { return x.MemcacheShardingStrategy } return nil } type MemcacheGetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key [][]byte `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` NameSpace *string `protobuf:"bytes,2,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"` ForCas *bool `protobuf:"varint,4,opt,name=for_cas,json=forCas" json:"for_cas,omitempty"` Override *AppOverride `protobuf:"bytes,5,opt,name=override" json:"override,omitempty"` ForPeek *bool `protobuf:"varint,6,opt,name=for_peek,json=forPeek,def=0" json:"for_peek,omitempty"` } // Default values for MemcacheGetRequest fields. const ( Default_MemcacheGetRequest_NameSpace = string("") Default_MemcacheGetRequest_ForPeek = bool(false) ) func (x *MemcacheGetRequest) Reset() { *x = MemcacheGetRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheGetRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheGetRequest) ProtoMessage() {} func (x *MemcacheGetRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheGetRequest.ProtoReflect.Descriptor instead. func (*MemcacheGetRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{2} } func (x *MemcacheGetRequest) GetKey() [][]byte { if x != nil { return x.Key } return nil } func (x *MemcacheGetRequest) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return Default_MemcacheGetRequest_NameSpace } func (x *MemcacheGetRequest) GetForCas() bool { if x != nil && x.ForCas != nil { return *x.ForCas } return false } func (x *MemcacheGetRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } func (x *MemcacheGetRequest) GetForPeek() bool { if x != nil && x.ForPeek != nil { return *x.ForPeek } return Default_MemcacheGetRequest_ForPeek } type ItemTimestamps struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ExpirationTimeSec *int64 `protobuf:"varint,1,opt,name=expiration_time_sec,json=expirationTimeSec" json:"expiration_time_sec,omitempty"` LastAccessTimeSec *int64 `protobuf:"varint,2,opt,name=last_access_time_sec,json=lastAccessTimeSec" json:"last_access_time_sec,omitempty"` DeleteLockTimeSec *int64 `protobuf:"varint,3,opt,name=delete_lock_time_sec,json=deleteLockTimeSec" json:"delete_lock_time_sec,omitempty"` } func (x *ItemTimestamps) Reset() { *x = ItemTimestamps{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ItemTimestamps) String() string { return protoimpl.X.MessageStringOf(x) } func (*ItemTimestamps) ProtoMessage() {} func (x *ItemTimestamps) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 ItemTimestamps.ProtoReflect.Descriptor instead. func (*ItemTimestamps) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{3} } func (x *ItemTimestamps) GetExpirationTimeSec() int64 { if x != nil && x.ExpirationTimeSec != nil { return *x.ExpirationTimeSec } return 0 } func (x *ItemTimestamps) GetLastAccessTimeSec() int64 { if x != nil && x.LastAccessTimeSec != nil { return *x.LastAccessTimeSec } return 0 } func (x *ItemTimestamps) GetDeleteLockTimeSec() int64 { if x != nil && x.DeleteLockTimeSec != nil { return *x.DeleteLockTimeSec } return 0 } type MemcacheGetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Item []*MemcacheGetResponse_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"` } func (x *MemcacheGetResponse) Reset() { *x = MemcacheGetResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheGetResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheGetResponse) ProtoMessage() {} func (x *MemcacheGetResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheGetResponse.ProtoReflect.Descriptor instead. func (*MemcacheGetResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{4} } func (x *MemcacheGetResponse) GetItem() []*MemcacheGetResponse_Item { if x != nil { return x.Item } return nil } type MemcacheSetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Item []*MemcacheSetRequest_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"` NameSpace *string `protobuf:"bytes,7,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"` Override *AppOverride `protobuf:"bytes,10,opt,name=override" json:"override,omitempty"` } // Default values for MemcacheSetRequest fields. const ( Default_MemcacheSetRequest_NameSpace = string("") ) func (x *MemcacheSetRequest) Reset() { *x = MemcacheSetRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheSetRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheSetRequest) ProtoMessage() {} func (x *MemcacheSetRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheSetRequest.ProtoReflect.Descriptor instead. func (*MemcacheSetRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{5} } func (x *MemcacheSetRequest) GetItem() []*MemcacheSetRequest_Item { if x != nil { return x.Item } return nil } func (x *MemcacheSetRequest) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return Default_MemcacheSetRequest_NameSpace } func (x *MemcacheSetRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } type MemcacheSetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SetStatus []MemcacheSetResponse_SetStatusCode `protobuf:"varint,1,rep,name=set_status,json=setStatus,enum=appengine.v2.MemcacheSetResponse_SetStatusCode" json:"set_status,omitempty"` } func (x *MemcacheSetResponse) Reset() { *x = MemcacheSetResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheSetResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheSetResponse) ProtoMessage() {} func (x *MemcacheSetResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheSetResponse.ProtoReflect.Descriptor instead. func (*MemcacheSetResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{6} } func (x *MemcacheSetResponse) GetSetStatus() []MemcacheSetResponse_SetStatusCode { if x != nil { return x.SetStatus } return nil } type MemcacheDeleteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Item []*MemcacheDeleteRequest_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"` NameSpace *string `protobuf:"bytes,4,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"` Override *AppOverride `protobuf:"bytes,5,opt,name=override" json:"override,omitempty"` } // Default values for MemcacheDeleteRequest fields. const ( Default_MemcacheDeleteRequest_NameSpace = string("") ) func (x *MemcacheDeleteRequest) Reset() { *x = MemcacheDeleteRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheDeleteRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheDeleteRequest) ProtoMessage() {} func (x *MemcacheDeleteRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheDeleteRequest.ProtoReflect.Descriptor instead. func (*MemcacheDeleteRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{7} } func (x *MemcacheDeleteRequest) GetItem() []*MemcacheDeleteRequest_Item { if x != nil { return x.Item } return nil } func (x *MemcacheDeleteRequest) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return Default_MemcacheDeleteRequest_NameSpace } func (x *MemcacheDeleteRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } type MemcacheDeleteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DeleteStatus []MemcacheDeleteResponse_DeleteStatusCode `protobuf:"varint,1,rep,name=delete_status,json=deleteStatus,enum=appengine.v2.MemcacheDeleteResponse_DeleteStatusCode" json:"delete_status,omitempty"` } func (x *MemcacheDeleteResponse) Reset() { *x = MemcacheDeleteResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheDeleteResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheDeleteResponse) ProtoMessage() {} func (x *MemcacheDeleteResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheDeleteResponse.ProtoReflect.Descriptor instead. func (*MemcacheDeleteResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{8} } func (x *MemcacheDeleteResponse) GetDeleteStatus() []MemcacheDeleteResponse_DeleteStatusCode { if x != nil { return x.DeleteStatus } return nil } type MemcacheIncrementRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key []byte `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` NameSpace *string `protobuf:"bytes,4,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"` Delta *uint64 `protobuf:"varint,2,opt,name=delta,def=1" json:"delta,omitempty"` Direction *MemcacheIncrementRequest_Direction `protobuf:"varint,3,opt,name=direction,enum=appengine.v2.MemcacheIncrementRequest_Direction,def=1" json:"direction,omitempty"` InitialValue *uint64 `protobuf:"varint,5,opt,name=initial_value,json=initialValue" json:"initial_value,omitempty"` InitialFlags *uint32 `protobuf:"fixed32,6,opt,name=initial_flags,json=initialFlags" json:"initial_flags,omitempty"` Override *AppOverride `protobuf:"bytes,7,opt,name=override" json:"override,omitempty"` } // Default values for MemcacheIncrementRequest fields. const ( Default_MemcacheIncrementRequest_NameSpace = string("") Default_MemcacheIncrementRequest_Delta = uint64(1) Default_MemcacheIncrementRequest_Direction = MemcacheIncrementRequest_INCREMENT ) func (x *MemcacheIncrementRequest) Reset() { *x = MemcacheIncrementRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheIncrementRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheIncrementRequest) ProtoMessage() {} func (x *MemcacheIncrementRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheIncrementRequest.ProtoReflect.Descriptor instead. func (*MemcacheIncrementRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{9} } func (x *MemcacheIncrementRequest) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *MemcacheIncrementRequest) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return Default_MemcacheIncrementRequest_NameSpace } func (x *MemcacheIncrementRequest) GetDelta() uint64 { if x != nil && x.Delta != nil { return *x.Delta } return Default_MemcacheIncrementRequest_Delta } func (x *MemcacheIncrementRequest) GetDirection() MemcacheIncrementRequest_Direction { if x != nil && x.Direction != nil { return *x.Direction } return Default_MemcacheIncrementRequest_Direction } func (x *MemcacheIncrementRequest) GetInitialValue() uint64 { if x != nil && x.InitialValue != nil { return *x.InitialValue } return 0 } func (x *MemcacheIncrementRequest) GetInitialFlags() uint32 { if x != nil && x.InitialFlags != nil { return *x.InitialFlags } return 0 } func (x *MemcacheIncrementRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } type MemcacheIncrementResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NewValue *uint64 `protobuf:"varint,1,opt,name=new_value,json=newValue" json:"new_value,omitempty"` IncrementStatus *MemcacheIncrementResponse_IncrementStatusCode `protobuf:"varint,2,opt,name=increment_status,json=incrementStatus,enum=appengine.v2.MemcacheIncrementResponse_IncrementStatusCode" json:"increment_status,omitempty"` } func (x *MemcacheIncrementResponse) Reset() { *x = MemcacheIncrementResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheIncrementResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheIncrementResponse) ProtoMessage() {} func (x *MemcacheIncrementResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheIncrementResponse.ProtoReflect.Descriptor instead. func (*MemcacheIncrementResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{10} } func (x *MemcacheIncrementResponse) GetNewValue() uint64 { if x != nil && x.NewValue != nil { return *x.NewValue } return 0 } func (x *MemcacheIncrementResponse) GetIncrementStatus() MemcacheIncrementResponse_IncrementStatusCode { if x != nil && x.IncrementStatus != nil { return *x.IncrementStatus } return MemcacheIncrementResponse_OK } type MemcacheBatchIncrementRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NameSpace *string `protobuf:"bytes,1,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"` Item []*MemcacheIncrementRequest `protobuf:"bytes,2,rep,name=item" json:"item,omitempty"` Override *AppOverride `protobuf:"bytes,3,opt,name=override" json:"override,omitempty"` } // Default values for MemcacheBatchIncrementRequest fields. const ( Default_MemcacheBatchIncrementRequest_NameSpace = string("") ) func (x *MemcacheBatchIncrementRequest) Reset() { *x = MemcacheBatchIncrementRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheBatchIncrementRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheBatchIncrementRequest) ProtoMessage() {} func (x *MemcacheBatchIncrementRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheBatchIncrementRequest.ProtoReflect.Descriptor instead. func (*MemcacheBatchIncrementRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{11} } func (x *MemcacheBatchIncrementRequest) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return Default_MemcacheBatchIncrementRequest_NameSpace } func (x *MemcacheBatchIncrementRequest) GetItem() []*MemcacheIncrementRequest { if x != nil { return x.Item } return nil } func (x *MemcacheBatchIncrementRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } type MemcacheBatchIncrementResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Item []*MemcacheIncrementResponse `protobuf:"bytes,1,rep,name=item" json:"item,omitempty"` } func (x *MemcacheBatchIncrementResponse) Reset() { *x = MemcacheBatchIncrementResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheBatchIncrementResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheBatchIncrementResponse) ProtoMessage() {} func (x *MemcacheBatchIncrementResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheBatchIncrementResponse.ProtoReflect.Descriptor instead. func (*MemcacheBatchIncrementResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{12} } func (x *MemcacheBatchIncrementResponse) GetItem() []*MemcacheIncrementResponse { if x != nil { return x.Item } return nil } type MemcacheFlushRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Override *AppOverride `protobuf:"bytes,1,opt,name=override" json:"override,omitempty"` } func (x *MemcacheFlushRequest) Reset() { *x = MemcacheFlushRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheFlushRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheFlushRequest) ProtoMessage() {} func (x *MemcacheFlushRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheFlushRequest.ProtoReflect.Descriptor instead. func (*MemcacheFlushRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{13} } func (x *MemcacheFlushRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } type MemcacheFlushResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *MemcacheFlushResponse) Reset() { *x = MemcacheFlushResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheFlushResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheFlushResponse) ProtoMessage() {} func (x *MemcacheFlushResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheFlushResponse.ProtoReflect.Descriptor instead. func (*MemcacheFlushResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{14} } type MemcacheStatsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Override *AppOverride `protobuf:"bytes,1,opt,name=override" json:"override,omitempty"` } func (x *MemcacheStatsRequest) Reset() { *x = MemcacheStatsRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheStatsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheStatsRequest) ProtoMessage() {} func (x *MemcacheStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheStatsRequest.ProtoReflect.Descriptor instead. func (*MemcacheStatsRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{15} } func (x *MemcacheStatsRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } type MergedNamespaceStats struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Hits *uint64 `protobuf:"varint,1,req,name=hits" json:"hits,omitempty"` Misses *uint64 `protobuf:"varint,2,req,name=misses" json:"misses,omitempty"` ByteHits *uint64 `protobuf:"varint,3,req,name=byte_hits,json=byteHits" json:"byte_hits,omitempty"` Items *uint64 `protobuf:"varint,4,req,name=items" json:"items,omitempty"` Bytes *uint64 `protobuf:"varint,5,req,name=bytes" json:"bytes,omitempty"` OldestItemAge *uint32 `protobuf:"fixed32,6,req,name=oldest_item_age,json=oldestItemAge" json:"oldest_item_age,omitempty"` } func (x *MergedNamespaceStats) Reset() { *x = MergedNamespaceStats{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MergedNamespaceStats) String() string { return protoimpl.X.MessageStringOf(x) } func (*MergedNamespaceStats) ProtoMessage() {} func (x *MergedNamespaceStats) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MergedNamespaceStats.ProtoReflect.Descriptor instead. func (*MergedNamespaceStats) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{16} } func (x *MergedNamespaceStats) GetHits() uint64 { if x != nil && x.Hits != nil { return *x.Hits } return 0 } func (x *MergedNamespaceStats) GetMisses() uint64 { if x != nil && x.Misses != nil { return *x.Misses } return 0 } func (x *MergedNamespaceStats) GetByteHits() uint64 { if x != nil && x.ByteHits != nil { return *x.ByteHits } return 0 } func (x *MergedNamespaceStats) GetItems() uint64 { if x != nil && x.Items != nil { return *x.Items } return 0 } func (x *MergedNamespaceStats) GetBytes() uint64 { if x != nil && x.Bytes != nil { return *x.Bytes } return 0 } func (x *MergedNamespaceStats) GetOldestItemAge() uint32 { if x != nil && x.OldestItemAge != nil { return *x.OldestItemAge } return 0 } type MemcacheStatsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Stats *MergedNamespaceStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"` } func (x *MemcacheStatsResponse) Reset() { *x = MemcacheStatsResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheStatsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheStatsResponse) ProtoMessage() {} func (x *MemcacheStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheStatsResponse.ProtoReflect.Descriptor instead. func (*MemcacheStatsResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{17} } func (x *MemcacheStatsResponse) GetStats() *MergedNamespaceStats { if x != nil { return x.Stats } return nil } type MemcacheGrabTailRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ItemCount *int32 `protobuf:"varint,1,req,name=item_count,json=itemCount" json:"item_count,omitempty"` NameSpace *string `protobuf:"bytes,2,opt,name=name_space,json=nameSpace,def=" json:"name_space,omitempty"` Override *AppOverride `protobuf:"bytes,3,opt,name=override" json:"override,omitempty"` } // Default values for MemcacheGrabTailRequest fields. const ( Default_MemcacheGrabTailRequest_NameSpace = string("") ) func (x *MemcacheGrabTailRequest) Reset() { *x = MemcacheGrabTailRequest{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheGrabTailRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheGrabTailRequest) ProtoMessage() {} func (x *MemcacheGrabTailRequest) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheGrabTailRequest.ProtoReflect.Descriptor instead. func (*MemcacheGrabTailRequest) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{18} } func (x *MemcacheGrabTailRequest) GetItemCount() int32 { if x != nil && x.ItemCount != nil { return *x.ItemCount } return 0 } func (x *MemcacheGrabTailRequest) GetNameSpace() string { if x != nil && x.NameSpace != nil { return *x.NameSpace } return Default_MemcacheGrabTailRequest_NameSpace } func (x *MemcacheGrabTailRequest) GetOverride() *AppOverride { if x != nil { return x.Override } return nil } type MemcacheGrabTailResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Item []*MemcacheGrabTailResponse_Item `protobuf:"group,1,rep,name=Item,json=item" json:"item,omitempty"` } func (x *MemcacheGrabTailResponse) Reset() { *x = MemcacheGrabTailResponse{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheGrabTailResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheGrabTailResponse) ProtoMessage() {} func (x *MemcacheGrabTailResponse) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheGrabTailResponse.ProtoReflect.Descriptor instead. func (*MemcacheGrabTailResponse) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{19} } func (x *MemcacheGrabTailResponse) GetItem() []*MemcacheGrabTailResponse_Item { if x != nil { return x.Item } return nil } type MemcacheGetResponse_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,req,name=value" json:"value,omitempty"` Flags *uint32 `protobuf:"fixed32,4,opt,name=flags" json:"flags,omitempty"` CasId *uint64 `protobuf:"fixed64,5,opt,name=cas_id,json=casId" json:"cas_id,omitempty"` ExpiresInSeconds *int32 `protobuf:"varint,6,opt,name=expires_in_seconds,json=expiresInSeconds" json:"expires_in_seconds,omitempty"` Timestamps *ItemTimestamps `protobuf:"bytes,8,opt,name=timestamps" json:"timestamps,omitempty"` IsDeleteLocked *bool `protobuf:"varint,9,opt,name=is_delete_locked,json=isDeleteLocked" json:"is_delete_locked,omitempty"` } func (x *MemcacheGetResponse_Item) Reset() { *x = MemcacheGetResponse_Item{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheGetResponse_Item) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheGetResponse_Item) ProtoMessage() {} func (x *MemcacheGetResponse_Item) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheGetResponse_Item.ProtoReflect.Descriptor instead. func (*MemcacheGetResponse_Item) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{4, 0} } func (x *MemcacheGetResponse_Item) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *MemcacheGetResponse_Item) GetValue() []byte { if x != nil { return x.Value } return nil } func (x *MemcacheGetResponse_Item) GetFlags() uint32 { if x != nil && x.Flags != nil { return *x.Flags } return 0 } func (x *MemcacheGetResponse_Item) GetCasId() uint64 { if x != nil && x.CasId != nil { return *x.CasId } return 0 } func (x *MemcacheGetResponse_Item) GetExpiresInSeconds() int32 { if x != nil && x.ExpiresInSeconds != nil { return *x.ExpiresInSeconds } return 0 } func (x *MemcacheGetResponse_Item) GetTimestamps() *ItemTimestamps { if x != nil { return x.Timestamps } return nil } func (x *MemcacheGetResponse_Item) GetIsDeleteLocked() bool { if x != nil && x.IsDeleteLocked != nil { return *x.IsDeleteLocked } return false } type MemcacheSetRequest_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,req,name=value" json:"value,omitempty"` Flags *uint32 `protobuf:"fixed32,4,opt,name=flags" json:"flags,omitempty"` SetPolicy *MemcacheSetRequest_SetPolicy `protobuf:"varint,5,opt,name=set_policy,json=setPolicy,enum=appengine.v2.MemcacheSetRequest_SetPolicy,def=1" json:"set_policy,omitempty"` ExpirationTime *uint32 `protobuf:"fixed32,6,opt,name=expiration_time,json=expirationTime,def=0" json:"expiration_time,omitempty"` CasId *uint64 `protobuf:"fixed64,8,opt,name=cas_id,json=casId" json:"cas_id,omitempty"` ForCas *bool `protobuf:"varint,9,opt,name=for_cas,json=forCas" json:"for_cas,omitempty"` } // Default values for MemcacheSetRequest_Item fields. const ( Default_MemcacheSetRequest_Item_SetPolicy = MemcacheSetRequest_SET Default_MemcacheSetRequest_Item_ExpirationTime = uint32(0) ) func (x *MemcacheSetRequest_Item) Reset() { *x = MemcacheSetRequest_Item{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheSetRequest_Item) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheSetRequest_Item) ProtoMessage() {} func (x *MemcacheSetRequest_Item) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheSetRequest_Item.ProtoReflect.Descriptor instead. func (*MemcacheSetRequest_Item) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{5, 0} } func (x *MemcacheSetRequest_Item) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *MemcacheSetRequest_Item) GetValue() []byte { if x != nil { return x.Value } return nil } func (x *MemcacheSetRequest_Item) GetFlags() uint32 { if x != nil && x.Flags != nil { return *x.Flags } return 0 } func (x *MemcacheSetRequest_Item) GetSetPolicy() MemcacheSetRequest_SetPolicy { if x != nil && x.SetPolicy != nil { return *x.SetPolicy } return Default_MemcacheSetRequest_Item_SetPolicy } func (x *MemcacheSetRequest_Item) GetExpirationTime() uint32 { if x != nil && x.ExpirationTime != nil { return *x.ExpirationTime } return Default_MemcacheSetRequest_Item_ExpirationTime } func (x *MemcacheSetRequest_Item) GetCasId() uint64 { if x != nil && x.CasId != nil { return *x.CasId } return 0 } func (x *MemcacheSetRequest_Item) GetForCas() bool { if x != nil && x.ForCas != nil { return *x.ForCas } return false } type MemcacheDeleteRequest_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"` DeleteTime *uint32 `protobuf:"fixed32,3,opt,name=delete_time,json=deleteTime,def=0" json:"delete_time,omitempty"` } // Default values for MemcacheDeleteRequest_Item fields. const ( Default_MemcacheDeleteRequest_Item_DeleteTime = uint32(0) ) func (x *MemcacheDeleteRequest_Item) Reset() { *x = MemcacheDeleteRequest_Item{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheDeleteRequest_Item) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheDeleteRequest_Item) ProtoMessage() {} func (x *MemcacheDeleteRequest_Item) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheDeleteRequest_Item.ProtoReflect.Descriptor instead. func (*MemcacheDeleteRequest_Item) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{7, 0} } func (x *MemcacheDeleteRequest_Item) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *MemcacheDeleteRequest_Item) GetDeleteTime() uint32 { if x != nil && x.DeleteTime != nil { return *x.DeleteTime } return Default_MemcacheDeleteRequest_Item_DeleteTime } type MemcacheGrabTailResponse_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Value []byte `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` Flags *uint32 `protobuf:"fixed32,3,opt,name=flags" json:"flags,omitempty"` } func (x *MemcacheGrabTailResponse_Item) Reset() { *x = MemcacheGrabTailResponse_Item{} if protoimpl.UnsafeEnabled { mi := &file_memcache_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemcacheGrabTailResponse_Item) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemcacheGrabTailResponse_Item) ProtoMessage() {} func (x *MemcacheGrabTailResponse_Item) ProtoReflect() protoreflect.Message { mi := &file_memcache_service_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 MemcacheGrabTailResponse_Item.ProtoReflect.Descriptor instead. func (*MemcacheGrabTailResponse_Item) Descriptor() ([]byte, []int) { return file_memcache_service_proto_rawDescGZIP(), []int{19, 0} } func (x *MemcacheGrabTailResponse_Item) GetValue() []byte { if x != nil { return x.Value } return nil } func (x *MemcacheGrabTailResponse_Item) GetFlags() uint32 { if x != nil && x.Flags != nil { return *x.Flags } return 0 } var File_memcache_service_proto protoreflect.FileDescriptor var file_memcache_service_proto_rawDesc = []byte{ 0x0a, 0x16, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0x83, 0x01, 0x0a, 0x14, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x6b, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x16, 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x67, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x02, 0x18, 0x01, 0x52, 0x14, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x12, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x10, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x1a, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x18, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0xb9, 0x01, 0x0a, 0x12, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x43, 0x61, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x08, 0x66, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x50, 0x65, 0x65, 0x6b, 0x22, 0xa2, 0x01, 0x0a, 0x0e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x22, 0xc5, 0x02, 0x0a, 0x13, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x1a, 0xf1, 0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x63, 0x61, 0x73, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0xcf, 0x03, 0x0a, 0x12, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x1a, 0xf0, 0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x65, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x03, 0x53, 0x45, 0x54, 0x52, 0x09, 0x73, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x07, 0x3a, 0x01, 0x30, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x63, 0x61, 0x73, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x43, 0x61, 0x73, 0x22, 0x33, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x43, 0x41, 0x53, 0x10, 0x04, 0x22, 0xa9, 0x01, 0x0a, 0x13, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x42, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x04, 0x22, 0xeb, 0x01, 0x0a, 0x15, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x28, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x1a, 0x3c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x07, 0x3a, 0x01, 0x30, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x16, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2e, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x22, 0xed, 0x02, 0x0a, 0x18, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x31, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x09, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x29, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x22, 0xdb, 0x01, 0x0a, 0x19, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x39, 0x0a, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x22, 0xb3, 0x01, 0x0a, 0x1d, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x5d, 0x0a, 0x1e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x4d, 0x0a, 0x14, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x14, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x14, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x68, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x08, 0x62, 0x79, 0x74, 0x65, 0x48, 0x69, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x02, 0x28, 0x07, 0x52, 0x0d, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x67, 0x65, 0x22, 0x51, 0x0a, 0x15, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x17, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x47, 0x72, 0x61, 0x62, 0x54, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x18, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x47, 0x72, 0x61, 0x62, 0x54, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x2b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x47, 0x72, 0x61, 0x62, 0x54, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x1a, 0x32, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6d, 0x65, 0x6d, 0x63, 0x61, 0x63, 0x68, 0x65, } var ( file_memcache_service_proto_rawDescOnce sync.Once file_memcache_service_proto_rawDescData = file_memcache_service_proto_rawDesc ) func file_memcache_service_proto_rawDescGZIP() []byte { file_memcache_service_proto_rawDescOnce.Do(func() { file_memcache_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_memcache_service_proto_rawDescData) }) return file_memcache_service_proto_rawDescData } var file_memcache_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6) var file_memcache_service_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_memcache_service_proto_goTypes = []interface{}{ (MemcacheServiceError_ErrorCode)(0), // 0: appengine.v2.MemcacheServiceError.ErrorCode (MemcacheSetRequest_SetPolicy)(0), // 1: appengine.v2.MemcacheSetRequest.SetPolicy (MemcacheSetResponse_SetStatusCode)(0), // 2: appengine.v2.MemcacheSetResponse.SetStatusCode (MemcacheDeleteResponse_DeleteStatusCode)(0), // 3: appengine.v2.MemcacheDeleteResponse.DeleteStatusCode (MemcacheIncrementRequest_Direction)(0), // 4: appengine.v2.MemcacheIncrementRequest.Direction (MemcacheIncrementResponse_IncrementStatusCode)(0), // 5: appengine.v2.MemcacheIncrementResponse.IncrementStatusCode (*MemcacheServiceError)(nil), // 6: appengine.v2.MemcacheServiceError (*AppOverride)(nil), // 7: appengine.v2.AppOverride (*MemcacheGetRequest)(nil), // 8: appengine.v2.MemcacheGetRequest (*ItemTimestamps)(nil), // 9: appengine.v2.ItemTimestamps (*MemcacheGetResponse)(nil), // 10: appengine.v2.MemcacheGetResponse (*MemcacheSetRequest)(nil), // 11: appengine.v2.MemcacheSetRequest (*MemcacheSetResponse)(nil), // 12: appengine.v2.MemcacheSetResponse (*MemcacheDeleteRequest)(nil), // 13: appengine.v2.MemcacheDeleteRequest (*MemcacheDeleteResponse)(nil), // 14: appengine.v2.MemcacheDeleteResponse (*MemcacheIncrementRequest)(nil), // 15: appengine.v2.MemcacheIncrementRequest (*MemcacheIncrementResponse)(nil), // 16: appengine.v2.MemcacheIncrementResponse (*MemcacheBatchIncrementRequest)(nil), // 17: appengine.v2.MemcacheBatchIncrementRequest (*MemcacheBatchIncrementResponse)(nil), // 18: appengine.v2.MemcacheBatchIncrementResponse (*MemcacheFlushRequest)(nil), // 19: appengine.v2.MemcacheFlushRequest (*MemcacheFlushResponse)(nil), // 20: appengine.v2.MemcacheFlushResponse (*MemcacheStatsRequest)(nil), // 21: appengine.v2.MemcacheStatsRequest (*MergedNamespaceStats)(nil), // 22: appengine.v2.MergedNamespaceStats (*MemcacheStatsResponse)(nil), // 23: appengine.v2.MemcacheStatsResponse (*MemcacheGrabTailRequest)(nil), // 24: appengine.v2.MemcacheGrabTailRequest (*MemcacheGrabTailResponse)(nil), // 25: appengine.v2.MemcacheGrabTailResponse (*MemcacheGetResponse_Item)(nil), // 26: appengine.v2.MemcacheGetResponse.Item (*MemcacheSetRequest_Item)(nil), // 27: appengine.v2.MemcacheSetRequest.Item (*MemcacheDeleteRequest_Item)(nil), // 28: appengine.v2.MemcacheDeleteRequest.Item (*MemcacheGrabTailResponse_Item)(nil), // 29: appengine.v2.MemcacheGrabTailResponse.Item } var file_memcache_service_proto_depIdxs = []int32{ 7, // 0: appengine.v2.MemcacheGetRequest.override:type_name -> appengine.v2.AppOverride 26, // 1: appengine.v2.MemcacheGetResponse.item:type_name -> appengine.v2.MemcacheGetResponse.Item 27, // 2: appengine.v2.MemcacheSetRequest.item:type_name -> appengine.v2.MemcacheSetRequest.Item 7, // 3: appengine.v2.MemcacheSetRequest.override:type_name -> appengine.v2.AppOverride 2, // 4: appengine.v2.MemcacheSetResponse.set_status:type_name -> appengine.v2.MemcacheSetResponse.SetStatusCode 28, // 5: appengine.v2.MemcacheDeleteRequest.item:type_name -> appengine.v2.MemcacheDeleteRequest.Item 7, // 6: appengine.v2.MemcacheDeleteRequest.override:type_name -> appengine.v2.AppOverride 3, // 7: appengine.v2.MemcacheDeleteResponse.delete_status:type_name -> appengine.v2.MemcacheDeleteResponse.DeleteStatusCode 4, // 8: appengine.v2.MemcacheIncrementRequest.direction:type_name -> appengine.v2.MemcacheIncrementRequest.Direction 7, // 9: appengine.v2.MemcacheIncrementRequest.override:type_name -> appengine.v2.AppOverride 5, // 10: appengine.v2.MemcacheIncrementResponse.increment_status:type_name -> appengine.v2.MemcacheIncrementResponse.IncrementStatusCode 15, // 11: appengine.v2.MemcacheBatchIncrementRequest.item:type_name -> appengine.v2.MemcacheIncrementRequest 7, // 12: appengine.v2.MemcacheBatchIncrementRequest.override:type_name -> appengine.v2.AppOverride 16, // 13: appengine.v2.MemcacheBatchIncrementResponse.item:type_name -> appengine.v2.MemcacheIncrementResponse 7, // 14: appengine.v2.MemcacheFlushRequest.override:type_name -> appengine.v2.AppOverride 7, // 15: appengine.v2.MemcacheStatsRequest.override:type_name -> appengine.v2.AppOverride 22, // 16: appengine.v2.MemcacheStatsResponse.stats:type_name -> appengine.v2.MergedNamespaceStats 7, // 17: appengine.v2.MemcacheGrabTailRequest.override:type_name -> appengine.v2.AppOverride 29, // 18: appengine.v2.MemcacheGrabTailResponse.item:type_name -> appengine.v2.MemcacheGrabTailResponse.Item 9, // 19: appengine.v2.MemcacheGetResponse.Item.timestamps:type_name -> appengine.v2.ItemTimestamps 1, // 20: appengine.v2.MemcacheSetRequest.Item.set_policy:type_name -> appengine.v2.MemcacheSetRequest.SetPolicy 21, // [21:21] is the sub-list for method output_type 21, // [21:21] is the sub-list for method input_type 21, // [21:21] is the sub-list for extension type_name 21, // [21:21] is the sub-list for extension extendee 0, // [0:21] is the sub-list for field type_name } func init() { file_memcache_service_proto_init() } func file_memcache_service_proto_init() { if File_memcache_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_memcache_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AppOverride); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheGetRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ItemTimestamps); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheGetResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheSetRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheSetResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheDeleteRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheDeleteResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheIncrementRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheIncrementResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheBatchIncrementRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheBatchIncrementResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheFlushRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheFlushResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheStatsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MergedNamespaceStats); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheStatsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheGrabTailRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheGrabTailResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheGetResponse_Item); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheSetRequest_Item); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheDeleteRequest_Item); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_memcache_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemcacheGrabTailResponse_Item); 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_memcache_service_proto_rawDesc, NumEnums: 6, NumMessages: 24, NumExtensions: 0, NumServices: 0, }, GoTypes: file_memcache_service_proto_goTypes, DependencyIndexes: file_memcache_service_proto_depIdxs, EnumInfos: file_memcache_service_proto_enumTypes, MessageInfos: file_memcache_service_proto_msgTypes, }.Build() File_memcache_service_proto = out.File file_memcache_service_proto_rawDesc = nil file_memcache_service_proto_goTypes = nil file_memcache_service_proto_depIdxs = nil }
memcache
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/memcache/memcache_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/memcache"; package appengine.v2; message MemcacheServiceError { enum ErrorCode { OK = 0; UNSPECIFIED_ERROR = 1; NAMESPACE_NOT_SET = 2; PERMISSION_DENIED = 3; INVALID_VALUE = 6; } } message AppOverride { required string app_id = 1; optional int32 num_memcacheg_backends = 2 [deprecated=true]; optional bool ignore_shardlock = 3 [deprecated=true]; optional string memcache_pool_hint = 4 [deprecated=true]; optional bytes memcache_sharding_strategy = 5 [deprecated=true]; } message MemcacheGetRequest { repeated bytes key = 1; optional string name_space = 2 [default = ""]; optional bool for_cas = 4; optional AppOverride override = 5; optional bool for_peek = 6 [default = false]; } message ItemTimestamps { optional int64 expiration_time_sec = 1; optional int64 last_access_time_sec = 2; optional int64 delete_lock_time_sec = 3; } message MemcacheGetResponse { repeated group Item = 1 { required bytes key = 2; required bytes value = 3; optional fixed32 flags = 4; optional fixed64 cas_id = 5; optional int32 expires_in_seconds = 6; optional ItemTimestamps timestamps = 8; optional bool is_delete_locked = 9; } } message MemcacheSetRequest { enum SetPolicy { SET = 1; ADD = 2; REPLACE = 3; CAS = 4; } repeated group Item = 1 { required bytes key = 2; required bytes value = 3; optional fixed32 flags = 4; optional SetPolicy set_policy = 5 [default = SET]; optional fixed32 expiration_time = 6 [default = 0]; optional fixed64 cas_id = 8; optional bool for_cas = 9; } optional string name_space = 7 [default = ""]; optional AppOverride override = 10; } message MemcacheSetResponse { enum SetStatusCode { STORED = 1; NOT_STORED = 2; ERROR = 3; EXISTS = 4; } repeated SetStatusCode set_status = 1; } message MemcacheDeleteRequest { repeated group Item = 1 { required bytes key = 2; optional fixed32 delete_time = 3 [default = 0]; } optional string name_space = 4 [default = ""]; optional AppOverride override = 5; } message MemcacheDeleteResponse { enum DeleteStatusCode { DELETED = 1; NOT_FOUND = 2; } repeated DeleteStatusCode delete_status = 1; } message MemcacheIncrementRequest { enum Direction { INCREMENT = 1; DECREMENT = 2; } required bytes key = 1; optional string name_space = 4 [default = ""]; optional uint64 delta = 2 [default = 1]; optional Direction direction = 3 [default = INCREMENT]; optional uint64 initial_value = 5; optional fixed32 initial_flags = 6; optional AppOverride override = 7; } message MemcacheIncrementResponse { enum IncrementStatusCode { OK = 1; NOT_CHANGED = 2; ERROR = 3; } optional uint64 new_value = 1; optional IncrementStatusCode increment_status = 2; } message MemcacheBatchIncrementRequest { optional string name_space = 1 [default = ""]; repeated MemcacheIncrementRequest item = 2; optional AppOverride override = 3; } message MemcacheBatchIncrementResponse { repeated MemcacheIncrementResponse item = 1; } message MemcacheFlushRequest { optional AppOverride override = 1; } message MemcacheFlushResponse { } message MemcacheStatsRequest { optional AppOverride override = 1; } message MergedNamespaceStats { required uint64 hits = 1; required uint64 misses = 2; required uint64 byte_hits = 3; required uint64 items = 4; required uint64 bytes = 5; required fixed32 oldest_item_age = 6; } message MemcacheStatsResponse { optional MergedNamespaceStats stats = 1; } message MemcacheGrabTailRequest { required int32 item_count = 1; optional string name_space = 2 [default = ""]; optional AppOverride override = 3; } message MemcacheGrabTailResponse { repeated group Item = 1 { required bytes value = 2; optional fixed32 flags = 3; } }
urlfetch
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/urlfetch/urlfetch_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/urlfetch"; package appengine.v2; 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]; }
urlfetch
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/urlfetch/urlfetch_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: urlfetch_service.proto package urlfetch import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type 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 ) // Enum value maps for URLFetchServiceError_ErrorCode. 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", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (URLFetchServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_urlfetch_service_proto_enumTypes[0].Descriptor() } func (URLFetchServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_urlfetch_service_proto_enumTypes[0] } func (x URLFetchServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = URLFetchServiceError_ErrorCode(num) return nil } // Deprecated: Use URLFetchServiceError_ErrorCode.Descriptor instead. func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_urlfetch_service_proto_rawDescGZIP(), []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 ) // Enum value maps for URLFetchRequest_RequestMethod. var ( URLFetchRequest_RequestMethod_name = map[int32]string{ 1: "GET", 2: "POST", 3: "HEAD", 4: "PUT", 5: "DELETE", 6: "PATCH", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (URLFetchRequest_RequestMethod) Descriptor() protoreflect.EnumDescriptor { return file_urlfetch_service_proto_enumTypes[1].Descriptor() } func (URLFetchRequest_RequestMethod) Type() protoreflect.EnumType { return &file_urlfetch_service_proto_enumTypes[1] } func (x URLFetchRequest_RequestMethod) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = URLFetchRequest_RequestMethod(num) return nil } // Deprecated: Use URLFetchRequest_RequestMethod.Descriptor instead. func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) { return file_urlfetch_service_proto_rawDescGZIP(), []int{1, 0} } type URLFetchServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *URLFetchServiceError) Reset() { *x = URLFetchServiceError{} if protoimpl.UnsafeEnabled { mi := &file_urlfetch_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *URLFetchServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*URLFetchServiceError) ProtoMessage() {} func (x *URLFetchServiceError) ProtoReflect() protoreflect.Message { mi := &file_urlfetch_service_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 URLFetchServiceError.ProtoReflect.Descriptor instead. func (*URLFetchServiceError) Descriptor() ([]byte, []int) { return file_urlfetch_service_proto_rawDescGZIP(), []int{0} } type URLFetchRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.v2.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"` } // Default values for URLFetchRequest fields. const ( Default_URLFetchRequest_FollowRedirects = bool(true) Default_URLFetchRequest_MustValidateServerCertificate = bool(true) ) func (x *URLFetchRequest) Reset() { *x = URLFetchRequest{} if protoimpl.UnsafeEnabled { mi := &file_urlfetch_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *URLFetchRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*URLFetchRequest) ProtoMessage() {} func (x *URLFetchRequest) ProtoReflect() protoreflect.Message { mi := &file_urlfetch_service_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 URLFetchRequest.ProtoReflect.Descriptor instead. func (*URLFetchRequest) Descriptor() ([]byte, []int) { return file_urlfetch_service_proto_rawDescGZIP(), []int{1} } func (x *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod { if x != nil && x.Method != nil { return *x.Method } return URLFetchRequest_GET } func (x *URLFetchRequest) GetUrl() string { if x != nil && x.Url != nil { return *x.Url } return "" } func (x *URLFetchRequest) GetHeader() []*URLFetchRequest_Header { if x != nil { return x.Header } return nil } func (x *URLFetchRequest) GetPayload() []byte { if x != nil { return x.Payload } return nil } func (x *URLFetchRequest) GetFollowRedirects() bool { if x != nil && x.FollowRedirects != nil { return *x.FollowRedirects } return Default_URLFetchRequest_FollowRedirects } func (x *URLFetchRequest) GetDeadline() float64 { if x != nil && x.Deadline != nil { return *x.Deadline } return 0 } func (x *URLFetchRequest) GetMustValidateServerCertificate() bool { if x != nil && x.MustValidateServerCertificate != nil { return *x.MustValidateServerCertificate } return Default_URLFetchRequest_MustValidateServerCertificate } type URLFetchResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } // Default values for URLFetchResponse fields. const ( Default_URLFetchResponse_ContentWasTruncated = bool(false) Default_URLFetchResponse_ApiCpuMilliseconds = int64(0) Default_URLFetchResponse_ApiBytesSent = int64(0) Default_URLFetchResponse_ApiBytesReceived = int64(0) ) func (x *URLFetchResponse) Reset() { *x = URLFetchResponse{} if protoimpl.UnsafeEnabled { mi := &file_urlfetch_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *URLFetchResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*URLFetchResponse) ProtoMessage() {} func (x *URLFetchResponse) ProtoReflect() protoreflect.Message { mi := &file_urlfetch_service_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 URLFetchResponse.ProtoReflect.Descriptor instead. func (*URLFetchResponse) Descriptor() ([]byte, []int) { return file_urlfetch_service_proto_rawDescGZIP(), []int{2} } func (x *URLFetchResponse) GetContent() []byte { if x != nil { return x.Content } return nil } func (x *URLFetchResponse) GetStatusCode() int32 { if x != nil && x.StatusCode != nil { return *x.StatusCode } return 0 } func (x *URLFetchResponse) GetHeader() []*URLFetchResponse_Header { if x != nil { return x.Header } return nil } func (x *URLFetchResponse) GetContentWasTruncated() bool { if x != nil && x.ContentWasTruncated != nil { return *x.ContentWasTruncated } return Default_URLFetchResponse_ContentWasTruncated } func (x *URLFetchResponse) GetExternalBytesSent() int64 { if x != nil && x.ExternalBytesSent != nil { return *x.ExternalBytesSent } return 0 } func (x *URLFetchResponse) GetExternalBytesReceived() int64 { if x != nil && x.ExternalBytesReceived != nil { return *x.ExternalBytesReceived } return 0 } func (x *URLFetchResponse) GetFinalUrl() string { if x != nil && x.FinalUrl != nil { return *x.FinalUrl } return "" } func (x *URLFetchResponse) GetApiCpuMilliseconds() int64 { if x != nil && x.ApiCpuMilliseconds != nil { return *x.ApiCpuMilliseconds } return Default_URLFetchResponse_ApiCpuMilliseconds } func (x *URLFetchResponse) GetApiBytesSent() int64 { if x != nil && x.ApiBytesSent != nil { return *x.ApiBytesSent } return Default_URLFetchResponse_ApiBytesSent } func (x *URLFetchResponse) GetApiBytesReceived() int64 { if x != nil && x.ApiBytesReceived != nil { return *x.ApiBytesReceived } return Default_URLFetchResponse_ApiBytesReceived } type URLFetchRequest_Header struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` } func (x *URLFetchRequest_Header) Reset() { *x = URLFetchRequest_Header{} if protoimpl.UnsafeEnabled { mi := &file_urlfetch_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *URLFetchRequest_Header) String() string { return protoimpl.X.MessageStringOf(x) } func (*URLFetchRequest_Header) ProtoMessage() {} func (x *URLFetchRequest_Header) ProtoReflect() protoreflect.Message { mi := &file_urlfetch_service_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 URLFetchRequest_Header.ProtoReflect.Descriptor instead. func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { return file_urlfetch_service_proto_rawDescGZIP(), []int{1, 0} } func (x *URLFetchRequest_Header) GetKey() string { if x != nil && x.Key != nil { return *x.Key } return "" } func (x *URLFetchRequest_Header) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } type URLFetchResponse_Header struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` } func (x *URLFetchResponse_Header) Reset() { *x = URLFetchResponse_Header{} if protoimpl.UnsafeEnabled { mi := &file_urlfetch_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *URLFetchResponse_Header) String() string { return protoimpl.X.MessageStringOf(x) } func (*URLFetchResponse_Header) ProtoMessage() {} func (x *URLFetchResponse_Header) ProtoReflect() protoreflect.Message { mi := &file_urlfetch_service_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 URLFetchResponse_Header.ProtoReflect.Descriptor instead. func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { return file_urlfetch_service_proto_rawDescGZIP(), []int{2, 0} } func (x *URLFetchResponse_Header) GetKey() string { if x != nil && x.Key != nil { return *x.Key } return "" } func (x *URLFetchResponse_Header) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } var File_urlfetch_service_proto protoreflect.FileDescriptor var file_urlfetch_service_proto_rawDesc = []byte{ 0x0a, 0x16, 0x75, 0x72, 0x6c, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0xab, 0x02, 0x0a, 0x14, 0x55, 0x52, 0x4c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x92, 0x02, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x55, 0x52, 0x4c, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x45, 0x54, 0x43, 0x48, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x53, 0x4c, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x4e, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x53, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x41, 0x4c, 0x46, 0x4f, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x59, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0c, 0x22, 0xdc, 0x03, 0x0a, 0x0f, 0x55, 0x52, 0x4c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x52, 0x4c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x3c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x52, 0x4c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x08, 0x01, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2e, 0x0a, 0x0f, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0f, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x4a, 0x0a, 0x1d, 0x4d, 0x75, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x1d, 0x4d, 0x75, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4c, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x06, 0x22, 0xff, 0x03, 0x0a, 0x10, 0x55, 0x52, 0x4c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x52, 0x4c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x57, 0x61, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x57, 0x61, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x55, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x31, 0x0a, 0x12, 0x41, 0x70, 0x69, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x01, 0x30, 0x52, 0x12, 0x41, 0x70, 0x69, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0c, 0x41, 0x70, 0x69, 0x42, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x01, 0x30, 0x52, 0x0c, 0x41, 0x70, 0x69, 0x42, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x10, 0x41, 0x70, 0x69, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x01, 0x30, 0x52, 0x10, 0x41, 0x70, 0x69, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x1a, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x75, 0x72, 0x6c, 0x66, 0x65, 0x74, 0x63, 0x68, } var ( file_urlfetch_service_proto_rawDescOnce sync.Once file_urlfetch_service_proto_rawDescData = file_urlfetch_service_proto_rawDesc ) func file_urlfetch_service_proto_rawDescGZIP() []byte { file_urlfetch_service_proto_rawDescOnce.Do(func() { file_urlfetch_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_urlfetch_service_proto_rawDescData) }) return file_urlfetch_service_proto_rawDescData } var file_urlfetch_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_urlfetch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_urlfetch_service_proto_goTypes = []interface{}{ (URLFetchServiceError_ErrorCode)(0), // 0: appengine.v2.URLFetchServiceError.ErrorCode (URLFetchRequest_RequestMethod)(0), // 1: appengine.v2.URLFetchRequest.RequestMethod (*URLFetchServiceError)(nil), // 2: appengine.v2.URLFetchServiceError (*URLFetchRequest)(nil), // 3: appengine.v2.URLFetchRequest (*URLFetchResponse)(nil), // 4: appengine.v2.URLFetchResponse (*URLFetchRequest_Header)(nil), // 5: appengine.v2.URLFetchRequest.Header (*URLFetchResponse_Header)(nil), // 6: appengine.v2.URLFetchResponse.Header } var file_urlfetch_service_proto_depIdxs = []int32{ 1, // 0: appengine.v2.URLFetchRequest.Method:type_name -> appengine.v2.URLFetchRequest.RequestMethod 5, // 1: appengine.v2.URLFetchRequest.header:type_name -> appengine.v2.URLFetchRequest.Header 6, // 2: appengine.v2.URLFetchResponse.header:type_name -> appengine.v2.URLFetchResponse.Header 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_urlfetch_service_proto_init() } func file_urlfetch_service_proto_init() { if File_urlfetch_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_urlfetch_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*URLFetchServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_urlfetch_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*URLFetchRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_urlfetch_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*URLFetchResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_urlfetch_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*URLFetchRequest_Header); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_urlfetch_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*URLFetchResponse_Header); 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_urlfetch_service_proto_rawDesc, NumEnums: 2, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, GoTypes: file_urlfetch_service_proto_goTypes, DependencyIndexes: file_urlfetch_service_proto_depIdxs, EnumInfos: file_urlfetch_service_proto_enumTypes, MessageInfos: file_urlfetch_service_proto_msgTypes, }.Build() File_urlfetch_service_proto = out.File file_urlfetch_service_proto_rawDesc = nil file_urlfetch_service_proto_goTypes = nil file_urlfetch_service_proto_depIdxs = nil }
image
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/image/images_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: images_service.proto package image import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type ImagesServiceError_ErrorCode int32 const ( ImagesServiceError_UNSPECIFIED_ERROR ImagesServiceError_ErrorCode = 1 ImagesServiceError_BAD_TRANSFORM_DATA ImagesServiceError_ErrorCode = 2 ImagesServiceError_NOT_IMAGE ImagesServiceError_ErrorCode = 3 ImagesServiceError_BAD_IMAGE_DATA ImagesServiceError_ErrorCode = 4 ImagesServiceError_IMAGE_TOO_LARGE ImagesServiceError_ErrorCode = 5 ImagesServiceError_INVALID_BLOB_KEY ImagesServiceError_ErrorCode = 6 ImagesServiceError_ACCESS_DENIED ImagesServiceError_ErrorCode = 7 ImagesServiceError_OBJECT_NOT_FOUND ImagesServiceError_ErrorCode = 8 ) // Enum value maps for ImagesServiceError_ErrorCode. var ( ImagesServiceError_ErrorCode_name = map[int32]string{ 1: "UNSPECIFIED_ERROR", 2: "BAD_TRANSFORM_DATA", 3: "NOT_IMAGE", 4: "BAD_IMAGE_DATA", 5: "IMAGE_TOO_LARGE", 6: "INVALID_BLOB_KEY", 7: "ACCESS_DENIED", 8: "OBJECT_NOT_FOUND", } ImagesServiceError_ErrorCode_value = map[string]int32{ "UNSPECIFIED_ERROR": 1, "BAD_TRANSFORM_DATA": 2, "NOT_IMAGE": 3, "BAD_IMAGE_DATA": 4, "IMAGE_TOO_LARGE": 5, "INVALID_BLOB_KEY": 6, "ACCESS_DENIED": 7, "OBJECT_NOT_FOUND": 8, } ) func (x ImagesServiceError_ErrorCode) Enum() *ImagesServiceError_ErrorCode { p := new(ImagesServiceError_ErrorCode) *p = x return p } func (x ImagesServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ImagesServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_images_service_proto_enumTypes[0].Descriptor() } func (ImagesServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_images_service_proto_enumTypes[0] } func (x ImagesServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *ImagesServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = ImagesServiceError_ErrorCode(num) return nil } // Deprecated: Use ImagesServiceError_ErrorCode.Descriptor instead. func (ImagesServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{0, 0} } type ImagesServiceTransform_Type int32 const ( ImagesServiceTransform_RESIZE ImagesServiceTransform_Type = 1 ImagesServiceTransform_ROTATE ImagesServiceTransform_Type = 2 ImagesServiceTransform_HORIZONTAL_FLIP ImagesServiceTransform_Type = 3 ImagesServiceTransform_VERTICAL_FLIP ImagesServiceTransform_Type = 4 ImagesServiceTransform_CROP ImagesServiceTransform_Type = 5 ImagesServiceTransform_IM_FEELING_LUCKY ImagesServiceTransform_Type = 6 ) // Enum value maps for ImagesServiceTransform_Type. var ( ImagesServiceTransform_Type_name = map[int32]string{ 1: "RESIZE", 2: "ROTATE", 3: "HORIZONTAL_FLIP", 4: "VERTICAL_FLIP", 5: "CROP", 6: "IM_FEELING_LUCKY", } ImagesServiceTransform_Type_value = map[string]int32{ "RESIZE": 1, "ROTATE": 2, "HORIZONTAL_FLIP": 3, "VERTICAL_FLIP": 4, "CROP": 5, "IM_FEELING_LUCKY": 6, } ) func (x ImagesServiceTransform_Type) Enum() *ImagesServiceTransform_Type { p := new(ImagesServiceTransform_Type) *p = x return p } func (x ImagesServiceTransform_Type) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ImagesServiceTransform_Type) Descriptor() protoreflect.EnumDescriptor { return file_images_service_proto_enumTypes[1].Descriptor() } func (ImagesServiceTransform_Type) Type() protoreflect.EnumType { return &file_images_service_proto_enumTypes[1] } func (x ImagesServiceTransform_Type) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *ImagesServiceTransform_Type) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = ImagesServiceTransform_Type(num) return nil } // Deprecated: Use ImagesServiceTransform_Type.Descriptor instead. func (ImagesServiceTransform_Type) EnumDescriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{1, 0} } type InputSettings_ORIENTATION_CORRECTION_TYPE int32 const ( InputSettings_UNCHANGED_ORIENTATION InputSettings_ORIENTATION_CORRECTION_TYPE = 0 InputSettings_CORRECT_ORIENTATION InputSettings_ORIENTATION_CORRECTION_TYPE = 1 ) // Enum value maps for InputSettings_ORIENTATION_CORRECTION_TYPE. var ( InputSettings_ORIENTATION_CORRECTION_TYPE_name = map[int32]string{ 0: "UNCHANGED_ORIENTATION", 1: "CORRECT_ORIENTATION", } InputSettings_ORIENTATION_CORRECTION_TYPE_value = map[string]int32{ "UNCHANGED_ORIENTATION": 0, "CORRECT_ORIENTATION": 1, } ) func (x InputSettings_ORIENTATION_CORRECTION_TYPE) Enum() *InputSettings_ORIENTATION_CORRECTION_TYPE { p := new(InputSettings_ORIENTATION_CORRECTION_TYPE) *p = x return p } func (x InputSettings_ORIENTATION_CORRECTION_TYPE) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (InputSettings_ORIENTATION_CORRECTION_TYPE) Descriptor() protoreflect.EnumDescriptor { return file_images_service_proto_enumTypes[2].Descriptor() } func (InputSettings_ORIENTATION_CORRECTION_TYPE) Type() protoreflect.EnumType { return &file_images_service_proto_enumTypes[2] } func (x InputSettings_ORIENTATION_CORRECTION_TYPE) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *InputSettings_ORIENTATION_CORRECTION_TYPE) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = InputSettings_ORIENTATION_CORRECTION_TYPE(num) return nil } // Deprecated: Use InputSettings_ORIENTATION_CORRECTION_TYPE.Descriptor instead. func (InputSettings_ORIENTATION_CORRECTION_TYPE) EnumDescriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{4, 0} } type OutputSettings_MIME_TYPE int32 const ( OutputSettings_PNG OutputSettings_MIME_TYPE = 0 OutputSettings_JPEG OutputSettings_MIME_TYPE = 1 OutputSettings_WEBP OutputSettings_MIME_TYPE = 2 ) // Enum value maps for OutputSettings_MIME_TYPE. var ( OutputSettings_MIME_TYPE_name = map[int32]string{ 0: "PNG", 1: "JPEG", 2: "WEBP", } OutputSettings_MIME_TYPE_value = map[string]int32{ "PNG": 0, "JPEG": 1, "WEBP": 2, } ) func (x OutputSettings_MIME_TYPE) Enum() *OutputSettings_MIME_TYPE { p := new(OutputSettings_MIME_TYPE) *p = x return p } func (x OutputSettings_MIME_TYPE) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (OutputSettings_MIME_TYPE) Descriptor() protoreflect.EnumDescriptor { return file_images_service_proto_enumTypes[3].Descriptor() } func (OutputSettings_MIME_TYPE) Type() protoreflect.EnumType { return &file_images_service_proto_enumTypes[3] } func (x OutputSettings_MIME_TYPE) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *OutputSettings_MIME_TYPE) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = OutputSettings_MIME_TYPE(num) return nil } // Deprecated: Use OutputSettings_MIME_TYPE.Descriptor instead. func (OutputSettings_MIME_TYPE) EnumDescriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{5, 0} } type CompositeImageOptions_ANCHOR int32 const ( CompositeImageOptions_TOP_LEFT CompositeImageOptions_ANCHOR = 0 CompositeImageOptions_TOP CompositeImageOptions_ANCHOR = 1 CompositeImageOptions_TOP_RIGHT CompositeImageOptions_ANCHOR = 2 CompositeImageOptions_LEFT CompositeImageOptions_ANCHOR = 3 CompositeImageOptions_CENTER CompositeImageOptions_ANCHOR = 4 CompositeImageOptions_RIGHT CompositeImageOptions_ANCHOR = 5 CompositeImageOptions_BOTTOM_LEFT CompositeImageOptions_ANCHOR = 6 CompositeImageOptions_BOTTOM CompositeImageOptions_ANCHOR = 7 CompositeImageOptions_BOTTOM_RIGHT CompositeImageOptions_ANCHOR = 8 ) // Enum value maps for CompositeImageOptions_ANCHOR. var ( CompositeImageOptions_ANCHOR_name = map[int32]string{ 0: "TOP_LEFT", 1: "TOP", 2: "TOP_RIGHT", 3: "LEFT", 4: "CENTER", 5: "RIGHT", 6: "BOTTOM_LEFT", 7: "BOTTOM", 8: "BOTTOM_RIGHT", } CompositeImageOptions_ANCHOR_value = map[string]int32{ "TOP_LEFT": 0, "TOP": 1, "TOP_RIGHT": 2, "LEFT": 3, "CENTER": 4, "RIGHT": 5, "BOTTOM_LEFT": 6, "BOTTOM": 7, "BOTTOM_RIGHT": 8, } ) func (x CompositeImageOptions_ANCHOR) Enum() *CompositeImageOptions_ANCHOR { p := new(CompositeImageOptions_ANCHOR) *p = x return p } func (x CompositeImageOptions_ANCHOR) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CompositeImageOptions_ANCHOR) Descriptor() protoreflect.EnumDescriptor { return file_images_service_proto_enumTypes[4].Descriptor() } func (CompositeImageOptions_ANCHOR) Type() protoreflect.EnumType { return &file_images_service_proto_enumTypes[4] } func (x CompositeImageOptions_ANCHOR) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *CompositeImageOptions_ANCHOR) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = CompositeImageOptions_ANCHOR(num) return nil } // Deprecated: Use CompositeImageOptions_ANCHOR.Descriptor instead. func (CompositeImageOptions_ANCHOR) EnumDescriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{8, 0} } type ImagesServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *ImagesServiceError) Reset() { *x = ImagesServiceError{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesServiceError) ProtoMessage() {} func (x *ImagesServiceError) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesServiceError.ProtoReflect.Descriptor instead. func (*ImagesServiceError) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{0} } type ImagesServiceTransform struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *ImagesServiceTransform) Reset() { *x = ImagesServiceTransform{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesServiceTransform) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesServiceTransform) ProtoMessage() {} func (x *ImagesServiceTransform) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesServiceTransform.ProtoReflect.Descriptor instead. func (*ImagesServiceTransform) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{1} } type Transform struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Width *int32 `protobuf:"varint,1,opt,name=width" json:"width,omitempty"` Height *int32 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"` CropToFit *bool `protobuf:"varint,11,opt,name=crop_to_fit,json=cropToFit,def=0" json:"crop_to_fit,omitempty"` CropOffsetX *float32 `protobuf:"fixed32,12,opt,name=crop_offset_x,json=cropOffsetX,def=0.5" json:"crop_offset_x,omitempty"` CropOffsetY *float32 `protobuf:"fixed32,13,opt,name=crop_offset_y,json=cropOffsetY,def=0.5" json:"crop_offset_y,omitempty"` Rotate *int32 `protobuf:"varint,3,opt,name=rotate,def=0" json:"rotate,omitempty"` HorizontalFlip *bool `protobuf:"varint,4,opt,name=horizontal_flip,json=horizontalFlip,def=0" json:"horizontal_flip,omitempty"` VerticalFlip *bool `protobuf:"varint,5,opt,name=vertical_flip,json=verticalFlip,def=0" json:"vertical_flip,omitempty"` CropLeftX *float32 `protobuf:"fixed32,6,opt,name=crop_left_x,json=cropLeftX,def=0" json:"crop_left_x,omitempty"` CropTopY *float32 `protobuf:"fixed32,7,opt,name=crop_top_y,json=cropTopY,def=0" json:"crop_top_y,omitempty"` CropRightX *float32 `protobuf:"fixed32,8,opt,name=crop_right_x,json=cropRightX,def=1" json:"crop_right_x,omitempty"` CropBottomY *float32 `protobuf:"fixed32,9,opt,name=crop_bottom_y,json=cropBottomY,def=1" json:"crop_bottom_y,omitempty"` Autolevels *bool `protobuf:"varint,10,opt,name=autolevels,def=0" json:"autolevels,omitempty"` AllowStretch *bool `protobuf:"varint,14,opt,name=allow_stretch,json=allowStretch,def=0" json:"allow_stretch,omitempty"` } // Default values for Transform fields. const ( Default_Transform_CropToFit = bool(false) Default_Transform_CropOffsetX = float32(0.5) Default_Transform_CropOffsetY = float32(0.5) Default_Transform_Rotate = int32(0) Default_Transform_HorizontalFlip = bool(false) Default_Transform_VerticalFlip = bool(false) Default_Transform_CropLeftX = float32(0) Default_Transform_CropTopY = float32(0) Default_Transform_CropRightX = float32(1) Default_Transform_CropBottomY = float32(1) Default_Transform_Autolevels = bool(false) Default_Transform_AllowStretch = bool(false) ) func (x *Transform) Reset() { *x = Transform{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Transform) String() string { return protoimpl.X.MessageStringOf(x) } func (*Transform) ProtoMessage() {} func (x *Transform) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 Transform.ProtoReflect.Descriptor instead. func (*Transform) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{2} } func (x *Transform) GetWidth() int32 { if x != nil && x.Width != nil { return *x.Width } return 0 } func (x *Transform) GetHeight() int32 { if x != nil && x.Height != nil { return *x.Height } return 0 } func (x *Transform) GetCropToFit() bool { if x != nil && x.CropToFit != nil { return *x.CropToFit } return Default_Transform_CropToFit } func (x *Transform) GetCropOffsetX() float32 { if x != nil && x.CropOffsetX != nil { return *x.CropOffsetX } return Default_Transform_CropOffsetX } func (x *Transform) GetCropOffsetY() float32 { if x != nil && x.CropOffsetY != nil { return *x.CropOffsetY } return Default_Transform_CropOffsetY } func (x *Transform) GetRotate() int32 { if x != nil && x.Rotate != nil { return *x.Rotate } return Default_Transform_Rotate } func (x *Transform) GetHorizontalFlip() bool { if x != nil && x.HorizontalFlip != nil { return *x.HorizontalFlip } return Default_Transform_HorizontalFlip } func (x *Transform) GetVerticalFlip() bool { if x != nil && x.VerticalFlip != nil { return *x.VerticalFlip } return Default_Transform_VerticalFlip } func (x *Transform) GetCropLeftX() float32 { if x != nil && x.CropLeftX != nil { return *x.CropLeftX } return Default_Transform_CropLeftX } func (x *Transform) GetCropTopY() float32 { if x != nil && x.CropTopY != nil { return *x.CropTopY } return Default_Transform_CropTopY } func (x *Transform) GetCropRightX() float32 { if x != nil && x.CropRightX != nil { return *x.CropRightX } return Default_Transform_CropRightX } func (x *Transform) GetCropBottomY() float32 { if x != nil && x.CropBottomY != nil { return *x.CropBottomY } return Default_Transform_CropBottomY } func (x *Transform) GetAutolevels() bool { if x != nil && x.Autolevels != nil { return *x.Autolevels } return Default_Transform_Autolevels } func (x *Transform) GetAllowStretch() bool { if x != nil && x.AllowStretch != nil { return *x.AllowStretch } return Default_Transform_AllowStretch } type ImageData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Content []byte `protobuf:"bytes,1,req,name=content" json:"content,omitempty"` BlobKey *string `protobuf:"bytes,2,opt,name=blob_key,json=blobKey" json:"blob_key,omitempty"` Width *int32 `protobuf:"varint,3,opt,name=width" json:"width,omitempty"` Height *int32 `protobuf:"varint,4,opt,name=height" json:"height,omitempty"` } func (x *ImageData) Reset() { *x = ImageData{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImageData) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImageData) ProtoMessage() {} func (x *ImageData) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImageData.ProtoReflect.Descriptor instead. func (*ImageData) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{3} } func (x *ImageData) GetContent() []byte { if x != nil { return x.Content } return nil } func (x *ImageData) GetBlobKey() string { if x != nil && x.BlobKey != nil { return *x.BlobKey } return "" } func (x *ImageData) GetWidth() int32 { if x != nil && x.Width != nil { return *x.Width } return 0 } func (x *ImageData) GetHeight() int32 { if x != nil && x.Height != nil { return *x.Height } return 0 } type InputSettings struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CorrectExifOrientation *InputSettings_ORIENTATION_CORRECTION_TYPE `protobuf:"varint,1,opt,name=correct_exif_orientation,json=correctExifOrientation,enum=appengine.v2.InputSettings_ORIENTATION_CORRECTION_TYPE,def=0" json:"correct_exif_orientation,omitempty"` ParseMetadata *bool `protobuf:"varint,2,opt,name=parse_metadata,json=parseMetadata,def=0" json:"parse_metadata,omitempty"` TransparentSubstitutionRgb *int32 `protobuf:"varint,3,opt,name=transparent_substitution_rgb,json=transparentSubstitutionRgb" json:"transparent_substitution_rgb,omitempty"` } // Default values for InputSettings fields. const ( Default_InputSettings_CorrectExifOrientation = InputSettings_UNCHANGED_ORIENTATION Default_InputSettings_ParseMetadata = bool(false) ) func (x *InputSettings) Reset() { *x = InputSettings{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *InputSettings) String() string { return protoimpl.X.MessageStringOf(x) } func (*InputSettings) ProtoMessage() {} func (x *InputSettings) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 InputSettings.ProtoReflect.Descriptor instead. func (*InputSettings) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{4} } func (x *InputSettings) GetCorrectExifOrientation() InputSettings_ORIENTATION_CORRECTION_TYPE { if x != nil && x.CorrectExifOrientation != nil { return *x.CorrectExifOrientation } return Default_InputSettings_CorrectExifOrientation } func (x *InputSettings) GetParseMetadata() bool { if x != nil && x.ParseMetadata != nil { return *x.ParseMetadata } return Default_InputSettings_ParseMetadata } func (x *InputSettings) GetTransparentSubstitutionRgb() int32 { if x != nil && x.TransparentSubstitutionRgb != nil { return *x.TransparentSubstitutionRgb } return 0 } type OutputSettings struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields MimeType *OutputSettings_MIME_TYPE `protobuf:"varint,1,opt,name=mime_type,json=mimeType,enum=appengine.v2.OutputSettings_MIME_TYPE,def=0" json:"mime_type,omitempty"` Quality *int32 `protobuf:"varint,2,opt,name=quality" json:"quality,omitempty"` } // Default values for OutputSettings fields. const ( Default_OutputSettings_MimeType = OutputSettings_PNG ) func (x *OutputSettings) Reset() { *x = OutputSettings{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OutputSettings) String() string { return protoimpl.X.MessageStringOf(x) } func (*OutputSettings) ProtoMessage() {} func (x *OutputSettings) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 OutputSettings.ProtoReflect.Descriptor instead. func (*OutputSettings) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{5} } func (x *OutputSettings) GetMimeType() OutputSettings_MIME_TYPE { if x != nil && x.MimeType != nil { return *x.MimeType } return Default_OutputSettings_MimeType } func (x *OutputSettings) GetQuality() int32 { if x != nil && x.Quality != nil { return *x.Quality } return 0 } type ImagesTransformRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Image *ImageData `protobuf:"bytes,1,req,name=image" json:"image,omitempty"` Transform []*Transform `protobuf:"bytes,2,rep,name=transform" json:"transform,omitempty"` Output *OutputSettings `protobuf:"bytes,3,req,name=output" json:"output,omitempty"` Input *InputSettings `protobuf:"bytes,4,opt,name=input" json:"input,omitempty"` } func (x *ImagesTransformRequest) Reset() { *x = ImagesTransformRequest{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesTransformRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesTransformRequest) ProtoMessage() {} func (x *ImagesTransformRequest) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesTransformRequest.ProtoReflect.Descriptor instead. func (*ImagesTransformRequest) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{6} } func (x *ImagesTransformRequest) GetImage() *ImageData { if x != nil { return x.Image } return nil } func (x *ImagesTransformRequest) GetTransform() []*Transform { if x != nil { return x.Transform } return nil } func (x *ImagesTransformRequest) GetOutput() *OutputSettings { if x != nil { return x.Output } return nil } func (x *ImagesTransformRequest) GetInput() *InputSettings { if x != nil { return x.Input } return nil } type ImagesTransformResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Image *ImageData `protobuf:"bytes,1,req,name=image" json:"image,omitempty"` SourceMetadata *string `protobuf:"bytes,2,opt,name=source_metadata,json=sourceMetadata" json:"source_metadata,omitempty"` } func (x *ImagesTransformResponse) Reset() { *x = ImagesTransformResponse{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesTransformResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesTransformResponse) ProtoMessage() {} func (x *ImagesTransformResponse) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesTransformResponse.ProtoReflect.Descriptor instead. func (*ImagesTransformResponse) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{7} } func (x *ImagesTransformResponse) GetImage() *ImageData { if x != nil { return x.Image } return nil } func (x *ImagesTransformResponse) GetSourceMetadata() string { if x != nil && x.SourceMetadata != nil { return *x.SourceMetadata } return "" } type CompositeImageOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SourceIndex *int32 `protobuf:"varint,1,req,name=source_index,json=sourceIndex" json:"source_index,omitempty"` XOffset *int32 `protobuf:"varint,2,req,name=x_offset,json=xOffset" json:"x_offset,omitempty"` YOffset *int32 `protobuf:"varint,3,req,name=y_offset,json=yOffset" json:"y_offset,omitempty"` Opacity *float32 `protobuf:"fixed32,4,req,name=opacity" json:"opacity,omitempty"` Anchor *CompositeImageOptions_ANCHOR `protobuf:"varint,5,req,name=anchor,enum=appengine.v2.CompositeImageOptions_ANCHOR" json:"anchor,omitempty"` } func (x *CompositeImageOptions) Reset() { *x = CompositeImageOptions{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompositeImageOptions) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompositeImageOptions) ProtoMessage() {} func (x *CompositeImageOptions) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 CompositeImageOptions.ProtoReflect.Descriptor instead. func (*CompositeImageOptions) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{8} } func (x *CompositeImageOptions) GetSourceIndex() int32 { if x != nil && x.SourceIndex != nil { return *x.SourceIndex } return 0 } func (x *CompositeImageOptions) GetXOffset() int32 { if x != nil && x.XOffset != nil { return *x.XOffset } return 0 } func (x *CompositeImageOptions) GetYOffset() int32 { if x != nil && x.YOffset != nil { return *x.YOffset } return 0 } func (x *CompositeImageOptions) GetOpacity() float32 { if x != nil && x.Opacity != nil { return *x.Opacity } return 0 } func (x *CompositeImageOptions) GetAnchor() CompositeImageOptions_ANCHOR { if x != nil && x.Anchor != nil { return *x.Anchor } return CompositeImageOptions_TOP_LEFT } type ImagesCanvas struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Width *int32 `protobuf:"varint,1,req,name=width" json:"width,omitempty"` Height *int32 `protobuf:"varint,2,req,name=height" json:"height,omitempty"` Output *OutputSettings `protobuf:"bytes,3,req,name=output" json:"output,omitempty"` Color *int32 `protobuf:"varint,4,opt,name=color,def=-1" json:"color,omitempty"` } // Default values for ImagesCanvas fields. const ( Default_ImagesCanvas_Color = int32(-1) ) func (x *ImagesCanvas) Reset() { *x = ImagesCanvas{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesCanvas) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesCanvas) ProtoMessage() {} func (x *ImagesCanvas) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesCanvas.ProtoReflect.Descriptor instead. func (*ImagesCanvas) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{9} } func (x *ImagesCanvas) GetWidth() int32 { if x != nil && x.Width != nil { return *x.Width } return 0 } func (x *ImagesCanvas) GetHeight() int32 { if x != nil && x.Height != nil { return *x.Height } return 0 } func (x *ImagesCanvas) GetOutput() *OutputSettings { if x != nil { return x.Output } return nil } func (x *ImagesCanvas) GetColor() int32 { if x != nil && x.Color != nil { return *x.Color } return Default_ImagesCanvas_Color } type ImagesCompositeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Image []*ImageData `protobuf:"bytes,1,rep,name=image" json:"image,omitempty"` Options []*CompositeImageOptions `protobuf:"bytes,2,rep,name=options" json:"options,omitempty"` Canvas *ImagesCanvas `protobuf:"bytes,3,req,name=canvas" json:"canvas,omitempty"` } func (x *ImagesCompositeRequest) Reset() { *x = ImagesCompositeRequest{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesCompositeRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesCompositeRequest) ProtoMessage() {} func (x *ImagesCompositeRequest) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesCompositeRequest.ProtoReflect.Descriptor instead. func (*ImagesCompositeRequest) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{10} } func (x *ImagesCompositeRequest) GetImage() []*ImageData { if x != nil { return x.Image } return nil } func (x *ImagesCompositeRequest) GetOptions() []*CompositeImageOptions { if x != nil { return x.Options } return nil } func (x *ImagesCompositeRequest) GetCanvas() *ImagesCanvas { if x != nil { return x.Canvas } return nil } type ImagesCompositeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Image *ImageData `protobuf:"bytes,1,req,name=image" json:"image,omitempty"` } func (x *ImagesCompositeResponse) Reset() { *x = ImagesCompositeResponse{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesCompositeResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesCompositeResponse) ProtoMessage() {} func (x *ImagesCompositeResponse) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesCompositeResponse.ProtoReflect.Descriptor instead. func (*ImagesCompositeResponse) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{11} } func (x *ImagesCompositeResponse) GetImage() *ImageData { if x != nil { return x.Image } return nil } type ImagesHistogramRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Image *ImageData `protobuf:"bytes,1,req,name=image" json:"image,omitempty"` } func (x *ImagesHistogramRequest) Reset() { *x = ImagesHistogramRequest{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesHistogramRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesHistogramRequest) ProtoMessage() {} func (x *ImagesHistogramRequest) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesHistogramRequest.ProtoReflect.Descriptor instead. func (*ImagesHistogramRequest) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{12} } func (x *ImagesHistogramRequest) GetImage() *ImageData { if x != nil { return x.Image } return nil } type ImagesHistogram struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Red []int32 `protobuf:"varint,1,rep,name=red" json:"red,omitempty"` Green []int32 `protobuf:"varint,2,rep,name=green" json:"green,omitempty"` Blue []int32 `protobuf:"varint,3,rep,name=blue" json:"blue,omitempty"` } func (x *ImagesHistogram) Reset() { *x = ImagesHistogram{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesHistogram) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesHistogram) ProtoMessage() {} func (x *ImagesHistogram) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesHistogram.ProtoReflect.Descriptor instead. func (*ImagesHistogram) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{13} } func (x *ImagesHistogram) GetRed() []int32 { if x != nil { return x.Red } return nil } func (x *ImagesHistogram) GetGreen() []int32 { if x != nil { return x.Green } return nil } func (x *ImagesHistogram) GetBlue() []int32 { if x != nil { return x.Blue } return nil } type ImagesHistogramResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Histogram *ImagesHistogram `protobuf:"bytes,1,req,name=histogram" json:"histogram,omitempty"` } func (x *ImagesHistogramResponse) Reset() { *x = ImagesHistogramResponse{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesHistogramResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesHistogramResponse) ProtoMessage() {} func (x *ImagesHistogramResponse) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesHistogramResponse.ProtoReflect.Descriptor instead. func (*ImagesHistogramResponse) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{14} } func (x *ImagesHistogramResponse) GetHistogram() *ImagesHistogram { if x != nil { return x.Histogram } return nil } type ImagesGetUrlBaseRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"` CreateSecureUrl *bool `protobuf:"varint,2,opt,name=create_secure_url,json=createSecureUrl,def=0" json:"create_secure_url,omitempty"` } // Default values for ImagesGetUrlBaseRequest fields. const ( Default_ImagesGetUrlBaseRequest_CreateSecureUrl = bool(false) ) func (x *ImagesGetUrlBaseRequest) Reset() { *x = ImagesGetUrlBaseRequest{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesGetUrlBaseRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesGetUrlBaseRequest) ProtoMessage() {} func (x *ImagesGetUrlBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesGetUrlBaseRequest.ProtoReflect.Descriptor instead. func (*ImagesGetUrlBaseRequest) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{15} } func (x *ImagesGetUrlBaseRequest) GetBlobKey() string { if x != nil && x.BlobKey != nil { return *x.BlobKey } return "" } func (x *ImagesGetUrlBaseRequest) GetCreateSecureUrl() bool { if x != nil && x.CreateSecureUrl != nil { return *x.CreateSecureUrl } return Default_ImagesGetUrlBaseRequest_CreateSecureUrl } type ImagesGetUrlBaseResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Url *string `protobuf:"bytes,1,req,name=url" json:"url,omitempty"` } func (x *ImagesGetUrlBaseResponse) Reset() { *x = ImagesGetUrlBaseResponse{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesGetUrlBaseResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesGetUrlBaseResponse) ProtoMessage() {} func (x *ImagesGetUrlBaseResponse) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesGetUrlBaseResponse.ProtoReflect.Descriptor instead. func (*ImagesGetUrlBaseResponse) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{16} } func (x *ImagesGetUrlBaseResponse) GetUrl() string { if x != nil && x.Url != nil { return *x.Url } return "" } type ImagesDeleteUrlBaseRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BlobKey *string `protobuf:"bytes,1,req,name=blob_key,json=blobKey" json:"blob_key,omitempty"` } func (x *ImagesDeleteUrlBaseRequest) Reset() { *x = ImagesDeleteUrlBaseRequest{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesDeleteUrlBaseRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesDeleteUrlBaseRequest) ProtoMessage() {} func (x *ImagesDeleteUrlBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesDeleteUrlBaseRequest.ProtoReflect.Descriptor instead. func (*ImagesDeleteUrlBaseRequest) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{17} } func (x *ImagesDeleteUrlBaseRequest) GetBlobKey() string { if x != nil && x.BlobKey != nil { return *x.BlobKey } return "" } type ImagesDeleteUrlBaseResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *ImagesDeleteUrlBaseResponse) Reset() { *x = ImagesDeleteUrlBaseResponse{} if protoimpl.UnsafeEnabled { mi := &file_images_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ImagesDeleteUrlBaseResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ImagesDeleteUrlBaseResponse) ProtoMessage() {} func (x *ImagesDeleteUrlBaseResponse) ProtoReflect() protoreflect.Message { mi := &file_images_service_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 ImagesDeleteUrlBaseResponse.ProtoReflect.Descriptor instead. func (*ImagesDeleteUrlBaseResponse) Descriptor() ([]byte, []int) { return file_images_service_proto_rawDescGZIP(), []int{18} } var File_images_service_proto protoreflect.FileDescriptor var file_images_service_proto_rawDesc = []byte{ 0x0a, 0x14, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0xc8, 0x01, 0x0a, 0x12, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xb1, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x41, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x41, 0x44, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x4c, 0x4f, 0x42, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x08, 0x22, 0x80, 0x01, 0x0a, 0x16, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x66, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x4f, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x46, 0x4c, 0x49, 0x50, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x56, 0x45, 0x52, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x46, 0x4c, 0x49, 0x50, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x52, 0x4f, 0x50, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4d, 0x5f, 0x46, 0x45, 0x45, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x55, 0x43, 0x4b, 0x59, 0x10, 0x06, 0x22, 0x8c, 0x04, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x63, 0x72, 0x6f, 0x70, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x70, 0x54, 0x6f, 0x46, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x70, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x03, 0x30, 0x2e, 0x35, 0x52, 0x0b, 0x63, 0x72, 0x6f, 0x70, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x70, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x03, 0x30, 0x2e, 0x35, 0x52, 0x0b, 0x63, 0x72, 0x6f, 0x70, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x12, 0x19, 0x0a, 0x06, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x06, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x0f, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x6c, 0x69, 0x70, 0x12, 0x2a, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x6c, 0x69, 0x70, 0x12, 0x21, 0x0a, 0x0b, 0x63, 0x72, 0x6f, 0x70, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x01, 0x30, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x70, 0x4c, 0x65, 0x66, 0x74, 0x58, 0x12, 0x1f, 0x0a, 0x0a, 0x63, 0x72, 0x6f, 0x70, 0x5f, 0x74, 0x6f, 0x70, 0x5f, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x01, 0x30, 0x52, 0x08, 0x63, 0x72, 0x6f, 0x70, 0x54, 0x6f, 0x70, 0x59, 0x12, 0x23, 0x0a, 0x0c, 0x63, 0x72, 0x6f, 0x70, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x01, 0x31, 0x52, 0x0a, 0x63, 0x72, 0x6f, 0x70, 0x52, 0x69, 0x67, 0x68, 0x74, 0x58, 0x12, 0x25, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x70, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x5f, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x01, 0x31, 0x52, 0x0b, 0x63, 0x72, 0x6f, 0x70, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x59, 0x12, 0x25, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x74, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x72, 0x65, 0x74, 0x63, 0x68, 0x22, 0x72, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x42, 0x02, 0x08, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xdd, 0x02, 0x0a, 0x0d, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x66, 0x5f, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4f, 0x52, 0x49, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x3a, 0x15, 0x55, 0x4e, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x49, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x52, 0x16, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x45, 0x78, 0x69, 0x66, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x67, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x67, 0x62, 0x22, 0x51, 0x0a, 0x1b, 0x4f, 0x52, 0x49, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x49, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x52, 0x49, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4d, 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x3a, 0x03, 0x50, 0x4e, 0x47, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x28, 0x0a, 0x09, 0x4d, 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x50, 0x45, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x45, 0x42, 0x50, 0x10, 0x02, 0x22, 0xe7, 0x01, 0x0a, 0x16, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x34, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x71, 0x0a, 0x17, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xce, 0x02, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x78, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x07, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x05, 0x52, 0x07, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x02, 0x52, 0x07, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x52, 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x22, 0x7e, 0x0a, 0x06, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4f, 0x50, 0x5f, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x4f, 0x50, 0x5f, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x5f, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x54, 0x54, 0x4f, 0x4d, 0x5f, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x08, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x02, 0x2d, 0x31, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x22, 0xba, 0x01, 0x0a, 0x16, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x22, 0x48, 0x0a, 0x17, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x47, 0x0a, 0x16, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x4d, 0x0a, 0x0f, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x22, 0x56, 0x0a, 0x17, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x09, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x22, 0x67, 0x0a, 0x17, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x47, 0x65, 0x74, 0x55, 0x72, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x2c, 0x0a, 0x18, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x47, 0x65, 0x74, 0x55, 0x72, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x37, 0x0a, 0x1a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x1d, 0x0a, 0x1b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, } var ( file_images_service_proto_rawDescOnce sync.Once file_images_service_proto_rawDescData = file_images_service_proto_rawDesc ) func file_images_service_proto_rawDescGZIP() []byte { file_images_service_proto_rawDescOnce.Do(func() { file_images_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_images_service_proto_rawDescData) }) return file_images_service_proto_rawDescData } var file_images_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5) var file_images_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_images_service_proto_goTypes = []interface{}{ (ImagesServiceError_ErrorCode)(0), // 0: appengine.v2.ImagesServiceError.ErrorCode (ImagesServiceTransform_Type)(0), // 1: appengine.v2.ImagesServiceTransform.Type (InputSettings_ORIENTATION_CORRECTION_TYPE)(0), // 2: appengine.v2.InputSettings.ORIENTATION_CORRECTION_TYPE (OutputSettings_MIME_TYPE)(0), // 3: appengine.v2.OutputSettings.MIME_TYPE (CompositeImageOptions_ANCHOR)(0), // 4: appengine.v2.CompositeImageOptions.ANCHOR (*ImagesServiceError)(nil), // 5: appengine.v2.ImagesServiceError (*ImagesServiceTransform)(nil), // 6: appengine.v2.ImagesServiceTransform (*Transform)(nil), // 7: appengine.v2.Transform (*ImageData)(nil), // 8: appengine.v2.ImageData (*InputSettings)(nil), // 9: appengine.v2.InputSettings (*OutputSettings)(nil), // 10: appengine.v2.OutputSettings (*ImagesTransformRequest)(nil), // 11: appengine.v2.ImagesTransformRequest (*ImagesTransformResponse)(nil), // 12: appengine.v2.ImagesTransformResponse (*CompositeImageOptions)(nil), // 13: appengine.v2.CompositeImageOptions (*ImagesCanvas)(nil), // 14: appengine.v2.ImagesCanvas (*ImagesCompositeRequest)(nil), // 15: appengine.v2.ImagesCompositeRequest (*ImagesCompositeResponse)(nil), // 16: appengine.v2.ImagesCompositeResponse (*ImagesHistogramRequest)(nil), // 17: appengine.v2.ImagesHistogramRequest (*ImagesHistogram)(nil), // 18: appengine.v2.ImagesHistogram (*ImagesHistogramResponse)(nil), // 19: appengine.v2.ImagesHistogramResponse (*ImagesGetUrlBaseRequest)(nil), // 20: appengine.v2.ImagesGetUrlBaseRequest (*ImagesGetUrlBaseResponse)(nil), // 21: appengine.v2.ImagesGetUrlBaseResponse (*ImagesDeleteUrlBaseRequest)(nil), // 22: appengine.v2.ImagesDeleteUrlBaseRequest (*ImagesDeleteUrlBaseResponse)(nil), // 23: appengine.v2.ImagesDeleteUrlBaseResponse } var file_images_service_proto_depIdxs = []int32{ 2, // 0: appengine.v2.InputSettings.correct_exif_orientation:type_name -> appengine.v2.InputSettings.ORIENTATION_CORRECTION_TYPE 3, // 1: appengine.v2.OutputSettings.mime_type:type_name -> appengine.v2.OutputSettings.MIME_TYPE 8, // 2: appengine.v2.ImagesTransformRequest.image:type_name -> appengine.v2.ImageData 7, // 3: appengine.v2.ImagesTransformRequest.transform:type_name -> appengine.v2.Transform 10, // 4: appengine.v2.ImagesTransformRequest.output:type_name -> appengine.v2.OutputSettings 9, // 5: appengine.v2.ImagesTransformRequest.input:type_name -> appengine.v2.InputSettings 8, // 6: appengine.v2.ImagesTransformResponse.image:type_name -> appengine.v2.ImageData 4, // 7: appengine.v2.CompositeImageOptions.anchor:type_name -> appengine.v2.CompositeImageOptions.ANCHOR 10, // 8: appengine.v2.ImagesCanvas.output:type_name -> appengine.v2.OutputSettings 8, // 9: appengine.v2.ImagesCompositeRequest.image:type_name -> appengine.v2.ImageData 13, // 10: appengine.v2.ImagesCompositeRequest.options:type_name -> appengine.v2.CompositeImageOptions 14, // 11: appengine.v2.ImagesCompositeRequest.canvas:type_name -> appengine.v2.ImagesCanvas 8, // 12: appengine.v2.ImagesCompositeResponse.image:type_name -> appengine.v2.ImageData 8, // 13: appengine.v2.ImagesHistogramRequest.image:type_name -> appengine.v2.ImageData 18, // 14: appengine.v2.ImagesHistogramResponse.histogram:type_name -> appengine.v2.ImagesHistogram 15, // [15:15] is the sub-list for method output_type 15, // [15:15] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name 15, // [15:15] is the sub-list for extension extendee 0, // [0:15] is the sub-list for field type_name } func init() { file_images_service_proto_init() } func file_images_service_proto_init() { if File_images_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_images_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesServiceTransform); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Transform); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImageData); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InputSettings); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OutputSettings); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesTransformRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesTransformResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompositeImageOptions); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesCanvas); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesCompositeRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesCompositeResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesHistogramRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesHistogram); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesHistogramResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesGetUrlBaseRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesGetUrlBaseResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesDeleteUrlBaseRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_images_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesDeleteUrlBaseResponse); 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_images_service_proto_rawDesc, NumEnums: 5, NumMessages: 19, NumExtensions: 0, NumServices: 0, }, GoTypes: file_images_service_proto_goTypes, DependencyIndexes: file_images_service_proto_depIdxs, EnumInfos: file_images_service_proto_enumTypes, MessageInfos: file_images_service_proto_msgTypes, }.Build() File_images_service_proto = out.File file_images_service_proto_rawDesc = nil file_images_service_proto_goTypes = nil file_images_service_proto_depIdxs = nil }
image
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/image/images_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/image"; package appengine.v2; message ImagesServiceError { enum ErrorCode { UNSPECIFIED_ERROR = 1; BAD_TRANSFORM_DATA = 2; NOT_IMAGE = 3; BAD_IMAGE_DATA = 4; IMAGE_TOO_LARGE = 5; INVALID_BLOB_KEY = 6; ACCESS_DENIED = 7; OBJECT_NOT_FOUND = 8; } } message ImagesServiceTransform { enum Type { RESIZE = 1; ROTATE = 2; HORIZONTAL_FLIP = 3; VERTICAL_FLIP = 4; CROP = 5; IM_FEELING_LUCKY = 6; } } message Transform { optional int32 width = 1; optional int32 height = 2; optional bool crop_to_fit = 11 [default = false]; optional float crop_offset_x = 12 [default = 0.5]; optional float crop_offset_y = 13 [default = 0.5]; optional int32 rotate = 3 [default = 0]; optional bool horizontal_flip = 4 [default = false]; optional bool vertical_flip = 5 [default = false]; optional float crop_left_x = 6 [default = 0.0]; optional float crop_top_y = 7 [default = 0.0]; optional float crop_right_x = 8 [default = 1.0]; optional float crop_bottom_y = 9 [default = 1.0]; optional bool autolevels = 10 [default = false]; optional bool allow_stretch = 14 [default = false]; } message ImageData { required bytes content = 1 [ctype=CORD]; optional string blob_key = 2; optional int32 width = 3; optional int32 height = 4; } message InputSettings { enum ORIENTATION_CORRECTION_TYPE { UNCHANGED_ORIENTATION = 0; CORRECT_ORIENTATION = 1; } optional ORIENTATION_CORRECTION_TYPE correct_exif_orientation = 1 [default=UNCHANGED_ORIENTATION]; optional bool parse_metadata = 2 [default=false]; optional int32 transparent_substitution_rgb = 3; } message OutputSettings { enum MIME_TYPE { PNG = 0; JPEG = 1; WEBP = 2; } optional MIME_TYPE mime_type = 1 [default=PNG]; optional int32 quality = 2; } message ImagesTransformRequest { required ImageData image = 1; repeated Transform transform = 2; required OutputSettings output = 3; optional InputSettings input = 4; } message ImagesTransformResponse { required ImageData image = 1; optional string source_metadata = 2; } message CompositeImageOptions { required int32 source_index = 1; required int32 x_offset = 2; required int32 y_offset = 3; required float opacity = 4; enum ANCHOR { TOP_LEFT = 0; TOP = 1; TOP_RIGHT = 2; LEFT = 3; CENTER = 4; RIGHT = 5; BOTTOM_LEFT = 6; BOTTOM = 7; BOTTOM_RIGHT = 8; } required ANCHOR anchor = 5; } message ImagesCanvas { required int32 width = 1; required int32 height = 2; required OutputSettings output = 3; optional int32 color = 4 [default=-1]; } message ImagesCompositeRequest { repeated ImageData image = 1; repeated CompositeImageOptions options = 2; required ImagesCanvas canvas = 3; } message ImagesCompositeResponse { required ImageData image = 1; } message ImagesHistogramRequest { required ImageData image = 1; } message ImagesHistogram { repeated int32 red = 1; repeated int32 green = 2; repeated int32 blue = 3; } message ImagesHistogramResponse { required ImagesHistogram histogram = 1; } message ImagesGetUrlBaseRequest { required string blob_key = 1; optional bool create_secure_url = 2 [default = false]; } message ImagesGetUrlBaseResponse { required string url = 1; } message ImagesDeleteUrlBaseRequest { required string blob_key = 1; } message ImagesDeleteUrlBaseResponse { }
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/search/search.pb.go
// Copyright 2023 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. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: search.proto package search import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Scope_Type int32 const ( Scope_USER_BY_CANONICAL_ID Scope_Type = 1 Scope_USER_BY_EMAIL Scope_Type = 2 Scope_GROUP_BY_CANONICAL_ID Scope_Type = 3 Scope_GROUP_BY_EMAIL Scope_Type = 4 Scope_GROUP_BY_DOMAIN Scope_Type = 5 Scope_ALL_USERS Scope_Type = 6 Scope_ALL_AUTHENTICATED_USERS Scope_Type = 7 ) // Enum value maps for Scope_Type. var ( Scope_Type_name = map[int32]string{ 1: "USER_BY_CANONICAL_ID", 2: "USER_BY_EMAIL", 3: "GROUP_BY_CANONICAL_ID", 4: "GROUP_BY_EMAIL", 5: "GROUP_BY_DOMAIN", 6: "ALL_USERS", 7: "ALL_AUTHENTICATED_USERS", } Scope_Type_value = map[string]int32{ "USER_BY_CANONICAL_ID": 1, "USER_BY_EMAIL": 2, "GROUP_BY_CANONICAL_ID": 3, "GROUP_BY_EMAIL": 4, "GROUP_BY_DOMAIN": 5, "ALL_USERS": 6, "ALL_AUTHENTICATED_USERS": 7, } ) func (x Scope_Type) Enum() *Scope_Type { p := new(Scope_Type) *p = x return p } func (x Scope_Type) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Scope_Type) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[0].Descriptor() } func (Scope_Type) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[0] } func (x Scope_Type) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Scope_Type) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Scope_Type(num) return nil } // Deprecated: Use Scope_Type.Descriptor instead. func (Scope_Type) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{0, 0} } type Entry_Permission int32 const ( Entry_READ Entry_Permission = 1 Entry_WRITE Entry_Permission = 2 Entry_FULL_CONTROL Entry_Permission = 3 ) // Enum value maps for Entry_Permission. var ( Entry_Permission_name = map[int32]string{ 1: "READ", 2: "WRITE", 3: "FULL_CONTROL", } Entry_Permission_value = map[string]int32{ "READ": 1, "WRITE": 2, "FULL_CONTROL": 3, } ) func (x Entry_Permission) Enum() *Entry_Permission { p := new(Entry_Permission) *p = x return p } func (x Entry_Permission) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Entry_Permission) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[1].Descriptor() } func (Entry_Permission) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[1] } func (x Entry_Permission) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Entry_Permission) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Entry_Permission(num) return nil } // Deprecated: Use Entry_Permission.Descriptor instead. func (Entry_Permission) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{1, 0} } type FieldValue_ContentType int32 const ( FieldValue_TEXT FieldValue_ContentType = 0 FieldValue_HTML FieldValue_ContentType = 1 FieldValue_ATOM FieldValue_ContentType = 2 FieldValue_DATE FieldValue_ContentType = 3 FieldValue_NUMBER FieldValue_ContentType = 4 FieldValue_GEO FieldValue_ContentType = 5 ) // Enum value maps for FieldValue_ContentType. var ( FieldValue_ContentType_name = map[int32]string{ 0: "TEXT", 1: "HTML", 2: "ATOM", 3: "DATE", 4: "NUMBER", 5: "GEO", } FieldValue_ContentType_value = map[string]int32{ "TEXT": 0, "HTML": 1, "ATOM": 2, "DATE": 3, "NUMBER": 4, "GEO": 5, } ) func (x FieldValue_ContentType) Enum() *FieldValue_ContentType { p := new(FieldValue_ContentType) *p = x return p } func (x FieldValue_ContentType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FieldValue_ContentType) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[2].Descriptor() } func (FieldValue_ContentType) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[2] } func (x FieldValue_ContentType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *FieldValue_ContentType) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = FieldValue_ContentType(num) return nil } // Deprecated: Use FieldValue_ContentType.Descriptor instead. func (FieldValue_ContentType) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{3, 0} } type FacetValue_ContentType int32 const ( FacetValue_ATOM FacetValue_ContentType = 2 FacetValue_NUMBER FacetValue_ContentType = 4 ) // Enum value maps for FacetValue_ContentType. var ( FacetValue_ContentType_name = map[int32]string{ 2: "ATOM", 4: "NUMBER", } FacetValue_ContentType_value = map[string]int32{ "ATOM": 2, "NUMBER": 4, } ) func (x FacetValue_ContentType) Enum() *FacetValue_ContentType { p := new(FacetValue_ContentType) *p = x return p } func (x FacetValue_ContentType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FacetValue_ContentType) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[3].Descriptor() } func (FacetValue_ContentType) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[3] } func (x FacetValue_ContentType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *FacetValue_ContentType) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = FacetValue_ContentType(num) return nil } // Deprecated: Use FacetValue_ContentType.Descriptor instead. func (FacetValue_ContentType) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{7, 0} } type Document_OrderIdSource int32 const ( Document_DEFAULTED Document_OrderIdSource = 0 Document_SUPPLIED Document_OrderIdSource = 1 ) // Enum value maps for Document_OrderIdSource. var ( Document_OrderIdSource_name = map[int32]string{ 0: "DEFAULTED", 1: "SUPPLIED", } Document_OrderIdSource_value = map[string]int32{ "DEFAULTED": 0, "SUPPLIED": 1, } ) func (x Document_OrderIdSource) Enum() *Document_OrderIdSource { p := new(Document_OrderIdSource) *p = x return p } func (x Document_OrderIdSource) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Document_OrderIdSource) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[4].Descriptor() } func (Document_OrderIdSource) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[4] } func (x Document_OrderIdSource) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Document_OrderIdSource) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Document_OrderIdSource(num) return nil } // Deprecated: Use Document_OrderIdSource.Descriptor instead. func (Document_OrderIdSource) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{10, 0} } type Document_Storage int32 const ( Document_DISK Document_Storage = 0 ) // Enum value maps for Document_Storage. var ( Document_Storage_name = map[int32]string{ 0: "DISK", } Document_Storage_value = map[string]int32{ "DISK": 0, } ) func (x Document_Storage) Enum() *Document_Storage { p := new(Document_Storage) *p = x return p } func (x Document_Storage) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Document_Storage) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[5].Descriptor() } func (Document_Storage) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[5] } func (x Document_Storage) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *Document_Storage) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = Document_Storage(num) return nil } // Deprecated: Use Document_Storage.Descriptor instead. func (Document_Storage) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{10, 1} } type SearchServiceError_ErrorCode int32 const ( SearchServiceError_OK SearchServiceError_ErrorCode = 0 SearchServiceError_INVALID_REQUEST SearchServiceError_ErrorCode = 1 SearchServiceError_TRANSIENT_ERROR SearchServiceError_ErrorCode = 2 SearchServiceError_INTERNAL_ERROR SearchServiceError_ErrorCode = 3 SearchServiceError_PERMISSION_DENIED SearchServiceError_ErrorCode = 4 SearchServiceError_TIMEOUT SearchServiceError_ErrorCode = 5 SearchServiceError_CONCURRENT_TRANSACTION SearchServiceError_ErrorCode = 6 ) // Enum value maps for SearchServiceError_ErrorCode. var ( SearchServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "INVALID_REQUEST", 2: "TRANSIENT_ERROR", 3: "INTERNAL_ERROR", 4: "PERMISSION_DENIED", 5: "TIMEOUT", 6: "CONCURRENT_TRANSACTION", } SearchServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "INVALID_REQUEST": 1, "TRANSIENT_ERROR": 2, "INTERNAL_ERROR": 3, "PERMISSION_DENIED": 4, "TIMEOUT": 5, "CONCURRENT_TRANSACTION": 6, } ) func (x SearchServiceError_ErrorCode) Enum() *SearchServiceError_ErrorCode { p := new(SearchServiceError_ErrorCode) *p = x return p } func (x SearchServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (SearchServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[6].Descriptor() } func (SearchServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[6] } func (x SearchServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *SearchServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = SearchServiceError_ErrorCode(num) return nil } // Deprecated: Use SearchServiceError_ErrorCode.Descriptor instead. func (SearchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{11, 0} } type IndexSpec_Consistency int32 const ( IndexSpec_GLOBAL IndexSpec_Consistency = 0 IndexSpec_PER_DOCUMENT IndexSpec_Consistency = 1 ) // Enum value maps for IndexSpec_Consistency. var ( IndexSpec_Consistency_name = map[int32]string{ 0: "GLOBAL", 1: "PER_DOCUMENT", } IndexSpec_Consistency_value = map[string]int32{ "GLOBAL": 0, "PER_DOCUMENT": 1, } ) func (x IndexSpec_Consistency) Enum() *IndexSpec_Consistency { p := new(IndexSpec_Consistency) *p = x return p } func (x IndexSpec_Consistency) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (IndexSpec_Consistency) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[7].Descriptor() } func (IndexSpec_Consistency) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[7] } func (x IndexSpec_Consistency) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *IndexSpec_Consistency) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = IndexSpec_Consistency(num) return nil } // Deprecated: Use IndexSpec_Consistency.Descriptor instead. func (IndexSpec_Consistency) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{13, 0} } type IndexSpec_Source int32 const ( IndexSpec_SEARCH IndexSpec_Source = 0 IndexSpec_DATASTORE IndexSpec_Source = 1 IndexSpec_CLOUD_STORAGE IndexSpec_Source = 2 ) // Enum value maps for IndexSpec_Source. var ( IndexSpec_Source_name = map[int32]string{ 0: "SEARCH", 1: "DATASTORE", 2: "CLOUD_STORAGE", } IndexSpec_Source_value = map[string]int32{ "SEARCH": 0, "DATASTORE": 1, "CLOUD_STORAGE": 2, } ) func (x IndexSpec_Source) Enum() *IndexSpec_Source { p := new(IndexSpec_Source) *p = x return p } func (x IndexSpec_Source) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (IndexSpec_Source) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[8].Descriptor() } func (IndexSpec_Source) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[8] } func (x IndexSpec_Source) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *IndexSpec_Source) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = IndexSpec_Source(num) return nil } // Deprecated: Use IndexSpec_Source.Descriptor instead. func (IndexSpec_Source) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{13, 1} } type IndexSpec_Mode int32 const ( IndexSpec_PRIORITY IndexSpec_Mode = 0 IndexSpec_BACKGROUND IndexSpec_Mode = 1 ) // Enum value maps for IndexSpec_Mode. var ( IndexSpec_Mode_name = map[int32]string{ 0: "PRIORITY", 1: "BACKGROUND", } IndexSpec_Mode_value = map[string]int32{ "PRIORITY": 0, "BACKGROUND": 1, } ) func (x IndexSpec_Mode) Enum() *IndexSpec_Mode { p := new(IndexSpec_Mode) *p = x return p } func (x IndexSpec_Mode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (IndexSpec_Mode) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[9].Descriptor() } func (IndexSpec_Mode) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[9] } func (x IndexSpec_Mode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *IndexSpec_Mode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = IndexSpec_Mode(num) return nil } // Deprecated: Use IndexSpec_Mode.Descriptor instead. func (IndexSpec_Mode) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{13, 2} } type IndexDocumentParams_Freshness int32 const ( IndexDocumentParams_SYNCHRONOUSLY IndexDocumentParams_Freshness = 0 IndexDocumentParams_WHEN_CONVENIENT IndexDocumentParams_Freshness = 1 ) // Enum value maps for IndexDocumentParams_Freshness. var ( IndexDocumentParams_Freshness_name = map[int32]string{ 0: "SYNCHRONOUSLY", 1: "WHEN_CONVENIENT", } IndexDocumentParams_Freshness_value = map[string]int32{ "SYNCHRONOUSLY": 0, "WHEN_CONVENIENT": 1, } ) func (x IndexDocumentParams_Freshness) Enum() *IndexDocumentParams_Freshness { p := new(IndexDocumentParams_Freshness) *p = x return p } func (x IndexDocumentParams_Freshness) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (IndexDocumentParams_Freshness) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[10].Descriptor() } func (IndexDocumentParams_Freshness) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[10] } func (x IndexDocumentParams_Freshness) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *IndexDocumentParams_Freshness) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = IndexDocumentParams_Freshness(num) return nil } // Deprecated: Use IndexDocumentParams_Freshness.Descriptor instead. func (IndexDocumentParams_Freshness) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{15, 0} } type ScorerSpec_Scorer int32 const ( ScorerSpec_RESCORING_MATCH_SCORER ScorerSpec_Scorer = 0 ScorerSpec_MATCH_SCORER ScorerSpec_Scorer = 2 ) // Enum value maps for ScorerSpec_Scorer. var ( ScorerSpec_Scorer_name = map[int32]string{ 0: "RESCORING_MATCH_SCORER", 2: "MATCH_SCORER", } ScorerSpec_Scorer_value = map[string]int32{ "RESCORING_MATCH_SCORER": 0, "MATCH_SCORER": 2, } ) func (x ScorerSpec_Scorer) Enum() *ScorerSpec_Scorer { p := new(ScorerSpec_Scorer) *p = x return p } func (x ScorerSpec_Scorer) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ScorerSpec_Scorer) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[11].Descriptor() } func (ScorerSpec_Scorer) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[11] } func (x ScorerSpec_Scorer) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *ScorerSpec_Scorer) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = ScorerSpec_Scorer(num) return nil } // Deprecated: Use ScorerSpec_Scorer.Descriptor instead. func (ScorerSpec_Scorer) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{31, 0} } type SearchParams_CursorType int32 const ( SearchParams_NONE SearchParams_CursorType = 0 SearchParams_SINGLE SearchParams_CursorType = 1 SearchParams_PER_RESULT SearchParams_CursorType = 2 ) // Enum value maps for SearchParams_CursorType. var ( SearchParams_CursorType_name = map[int32]string{ 0: "NONE", 1: "SINGLE", 2: "PER_RESULT", } SearchParams_CursorType_value = map[string]int32{ "NONE": 0, "SINGLE": 1, "PER_RESULT": 2, } ) func (x SearchParams_CursorType) Enum() *SearchParams_CursorType { p := new(SearchParams_CursorType) *p = x return p } func (x SearchParams_CursorType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (SearchParams_CursorType) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[12].Descriptor() } func (SearchParams_CursorType) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[12] } func (x SearchParams_CursorType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *SearchParams_CursorType) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = SearchParams_CursorType(num) return nil } // Deprecated: Use SearchParams_CursorType.Descriptor instead. func (SearchParams_CursorType) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{38, 0} } type SearchParams_ParsingMode int32 const ( SearchParams_STRICT SearchParams_ParsingMode = 0 SearchParams_RELAXED SearchParams_ParsingMode = 1 ) // Enum value maps for SearchParams_ParsingMode. var ( SearchParams_ParsingMode_name = map[int32]string{ 0: "STRICT", 1: "RELAXED", } SearchParams_ParsingMode_value = map[string]int32{ "STRICT": 0, "RELAXED": 1, } ) func (x SearchParams_ParsingMode) Enum() *SearchParams_ParsingMode { p := new(SearchParams_ParsingMode) *p = x return p } func (x SearchParams_ParsingMode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (SearchParams_ParsingMode) Descriptor() protoreflect.EnumDescriptor { return file_search_proto_enumTypes[13].Descriptor() } func (SearchParams_ParsingMode) Type() protoreflect.EnumType { return &file_search_proto_enumTypes[13] } func (x SearchParams_ParsingMode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *SearchParams_ParsingMode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = SearchParams_ParsingMode(num) return nil } // Deprecated: Use SearchParams_ParsingMode.Descriptor instead. func (SearchParams_ParsingMode) EnumDescriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{38, 1} } type Scope struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Type *Scope_Type `protobuf:"varint,1,opt,name=type,enum=search.v2.Scope_Type" json:"type,omitempty"` Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` } func (x *Scope) Reset() { *x = Scope{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Scope) String() string { return protoimpl.X.MessageStringOf(x) } func (*Scope) ProtoMessage() {} func (x *Scope) ProtoReflect() protoreflect.Message { mi := &file_search_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 Scope.ProtoReflect.Descriptor instead. func (*Scope) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{0} } func (x *Scope) GetType() Scope_Type { if x != nil && x.Type != nil { return *x.Type } return Scope_USER_BY_CANONICAL_ID } func (x *Scope) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } type Entry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Scope *Scope `protobuf:"bytes,1,opt,name=scope" json:"scope,omitempty"` Permission *Entry_Permission `protobuf:"varint,2,opt,name=permission,enum=search.v2.Entry_Permission" json:"permission,omitempty"` DisplayName *string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"` } func (x *Entry) Reset() { *x = Entry{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Entry) String() string { return protoimpl.X.MessageStringOf(x) } func (*Entry) ProtoMessage() {} func (x *Entry) ProtoReflect() protoreflect.Message { mi := &file_search_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 Entry.ProtoReflect.Descriptor instead. func (*Entry) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{1} } func (x *Entry) GetScope() *Scope { if x != nil { return x.Scope } return nil } func (x *Entry) GetPermission() Entry_Permission { if x != nil && x.Permission != nil { return *x.Permission } return Entry_READ } func (x *Entry) GetDisplayName() string { if x != nil && x.DisplayName != nil { return *x.DisplayName } return "" } type AccessControlList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Owner *string `protobuf:"bytes,1,opt,name=owner" json:"owner,omitempty"` Entries []*Entry `protobuf:"bytes,2,rep,name=entries" json:"entries,omitempty"` } func (x *AccessControlList) Reset() { *x = AccessControlList{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *AccessControlList) String() string { return protoimpl.X.MessageStringOf(x) } func (*AccessControlList) ProtoMessage() {} func (x *AccessControlList) ProtoReflect() protoreflect.Message { mi := &file_search_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 AccessControlList.ProtoReflect.Descriptor instead. func (*AccessControlList) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{2} } func (x *AccessControlList) GetOwner() string { if x != nil && x.Owner != nil { return *x.Owner } return "" } func (x *AccessControlList) GetEntries() []*Entry { if x != nil { return x.Entries } return nil } type FieldValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Type *FieldValue_ContentType `protobuf:"varint,1,opt,name=type,enum=search.v2.FieldValue_ContentType,def=0" json:"type,omitempty"` Language *string `protobuf:"bytes,2,opt,name=language,def=en" json:"language,omitempty"` StringValue *string `protobuf:"bytes,3,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` Geo *FieldValue_Geo `protobuf:"group,4,opt,name=Geo,json=geo" json:"geo,omitempty"` } // Default values for FieldValue fields. const ( Default_FieldValue_Type = FieldValue_TEXT Default_FieldValue_Language = string("en") ) func (x *FieldValue) Reset() { *x = FieldValue{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FieldValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*FieldValue) ProtoMessage() {} func (x *FieldValue) ProtoReflect() protoreflect.Message { mi := &file_search_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 FieldValue.ProtoReflect.Descriptor instead. func (*FieldValue) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{3} } func (x *FieldValue) GetType() FieldValue_ContentType { if x != nil && x.Type != nil { return *x.Type } return Default_FieldValue_Type } func (x *FieldValue) GetLanguage() string { if x != nil && x.Language != nil { return *x.Language } return Default_FieldValue_Language } func (x *FieldValue) GetStringValue() string { if x != nil && x.StringValue != nil { return *x.StringValue } return "" } func (x *FieldValue) GetGeo() *FieldValue_Geo { if x != nil { return x.Geo } return nil } type Field struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Value *FieldValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` } func (x *Field) Reset() { *x = Field{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Field) String() string { return protoimpl.X.MessageStringOf(x) } func (*Field) ProtoMessage() {} func (x *Field) ProtoReflect() protoreflect.Message { mi := &file_search_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 Field.ProtoReflect.Descriptor instead. func (*Field) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{4} } func (x *Field) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *Field) GetValue() *FieldValue { if x != nil { return x.Value } return nil } type FieldTypes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Type []FieldValue_ContentType `protobuf:"varint,2,rep,name=type,enum=search.v2.FieldValue_ContentType" json:"type,omitempty"` } func (x *FieldTypes) Reset() { *x = FieldTypes{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FieldTypes) String() string { return protoimpl.X.MessageStringOf(x) } func (*FieldTypes) ProtoMessage() {} func (x *FieldTypes) ProtoReflect() protoreflect.Message { mi := &file_search_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 FieldTypes.ProtoReflect.Descriptor instead. func (*FieldTypes) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{5} } func (x *FieldTypes) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FieldTypes) GetType() []FieldValue_ContentType { if x != nil { return x.Type } return nil } type IndexShardSettings struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PrevNumShards []int32 `protobuf:"varint,1,rep,name=prev_num_shards,json=prevNumShards" json:"prev_num_shards,omitempty"` NumShards *int32 `protobuf:"varint,2,req,name=num_shards,json=numShards,def=1" json:"num_shards,omitempty"` PrevNumShardsSearchFalse []int32 `protobuf:"varint,3,rep,name=prev_num_shards_search_false,json=prevNumShardsSearchFalse" json:"prev_num_shards_search_false,omitempty"` LocalReplica *string `protobuf:"bytes,4,opt,name=local_replica,json=localReplica,def=" json:"local_replica,omitempty"` } // Default values for IndexShardSettings fields. const ( Default_IndexShardSettings_NumShards = int32(1) Default_IndexShardSettings_LocalReplica = string("") ) func (x *IndexShardSettings) Reset() { *x = IndexShardSettings{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexShardSettings) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexShardSettings) ProtoMessage() {} func (x *IndexShardSettings) ProtoReflect() protoreflect.Message { mi := &file_search_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 IndexShardSettings.ProtoReflect.Descriptor instead. func (*IndexShardSettings) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{6} } func (x *IndexShardSettings) GetPrevNumShards() []int32 { if x != nil { return x.PrevNumShards } return nil } func (x *IndexShardSettings) GetNumShards() int32 { if x != nil && x.NumShards != nil { return *x.NumShards } return Default_IndexShardSettings_NumShards } func (x *IndexShardSettings) GetPrevNumShardsSearchFalse() []int32 { if x != nil { return x.PrevNumShardsSearchFalse } return nil } func (x *IndexShardSettings) GetLocalReplica() string { if x != nil && x.LocalReplica != nil { return *x.LocalReplica } return Default_IndexShardSettings_LocalReplica } type FacetValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Type *FacetValue_ContentType `protobuf:"varint,1,opt,name=type,enum=search.v2.FacetValue_ContentType,def=2" json:"type,omitempty"` StringValue *string `protobuf:"bytes,3,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` } // Default values for FacetValue fields. const ( Default_FacetValue_Type = FacetValue_ATOM ) func (x *FacetValue) Reset() { *x = FacetValue{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetValue) ProtoMessage() {} func (x *FacetValue) ProtoReflect() protoreflect.Message { mi := &file_search_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 FacetValue.ProtoReflect.Descriptor instead. func (*FacetValue) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{7} } func (x *FacetValue) GetType() FacetValue_ContentType { if x != nil && x.Type != nil { return *x.Type } return Default_FacetValue_Type } func (x *FacetValue) GetStringValue() string { if x != nil && x.StringValue != nil { return *x.StringValue } return "" } type Facet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Value *FacetValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` } func (x *Facet) Reset() { *x = Facet{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Facet) String() string { return protoimpl.X.MessageStringOf(x) } func (*Facet) ProtoMessage() {} func (x *Facet) ProtoReflect() protoreflect.Message { mi := &file_search_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 Facet.ProtoReflect.Descriptor instead. func (*Facet) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{8} } func (x *Facet) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *Facet) GetValue() *FacetValue { if x != nil { return x.Value } return nil } type DocumentMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Version *int64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` CommittedStVersion *int64 `protobuf:"varint,2,opt,name=committed_st_version,json=committedStVersion" json:"committed_st_version,omitempty"` } func (x *DocumentMetadata) Reset() { *x = DocumentMetadata{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DocumentMetadata) String() string { return protoimpl.X.MessageStringOf(x) } func (*DocumentMetadata) ProtoMessage() {} func (x *DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_search_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 DocumentMetadata.ProtoReflect.Descriptor instead. func (*DocumentMetadata) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{9} } func (x *DocumentMetadata) GetVersion() int64 { if x != nil && x.Version != nil { return *x.Version } return 0 } func (x *DocumentMetadata) GetCommittedStVersion() int64 { if x != nil && x.CommittedStVersion != nil { return *x.CommittedStVersion } return 0 } type Document struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Language *string `protobuf:"bytes,2,opt,name=language,def=en" json:"language,omitempty"` Field []*Field `protobuf:"bytes,3,rep,name=field" json:"field,omitempty"` OrderId *int32 `protobuf:"varint,4,opt,name=order_id,json=orderId" json:"order_id,omitempty"` OrderIdSource *Document_OrderIdSource `protobuf:"varint,6,opt,name=order_id_source,json=orderIdSource,enum=search.v2.Document_OrderIdSource,def=1" json:"order_id_source,omitempty"` Storage *Document_Storage `protobuf:"varint,5,opt,name=storage,enum=search.v2.Document_Storage,def=0" json:"storage,omitempty"` Facet []*Facet `protobuf:"bytes,8,rep,name=facet" json:"facet,omitempty"` } // Default values for Document fields. const ( Default_Document_Language = string("en") Default_Document_OrderIdSource = Document_SUPPLIED Default_Document_Storage = Document_DISK ) func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Document) String() string { return protoimpl.X.MessageStringOf(x) } func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_search_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 Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{10} } func (x *Document) GetId() string { if x != nil && x.Id != nil { return *x.Id } return "" } func (x *Document) GetLanguage() string { if x != nil && x.Language != nil { return *x.Language } return Default_Document_Language } func (x *Document) GetField() []*Field { if x != nil { return x.Field } return nil } func (x *Document) GetOrderId() int32 { if x != nil && x.OrderId != nil { return *x.OrderId } return 0 } func (x *Document) GetOrderIdSource() Document_OrderIdSource { if x != nil && x.OrderIdSource != nil { return *x.OrderIdSource } return Default_Document_OrderIdSource } func (x *Document) GetStorage() Document_Storage { if x != nil && x.Storage != nil { return *x.Storage } return Default_Document_Storage } func (x *Document) GetFacet() []*Facet { if x != nil { return x.Facet } return nil } type SearchServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *SearchServiceError) Reset() { *x = SearchServiceError{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SearchServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*SearchServiceError) ProtoMessage() {} func (x *SearchServiceError) ProtoReflect() protoreflect.Message { mi := &file_search_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 SearchServiceError.ProtoReflect.Descriptor instead. func (*SearchServiceError) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{11} } type RequestStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Code *SearchServiceError_ErrorCode `protobuf:"varint,1,req,name=code,enum=search.v2.SearchServiceError_ErrorCode" json:"code,omitempty"` ErrorDetail *string `protobuf:"bytes,2,opt,name=error_detail,json=errorDetail" json:"error_detail,omitempty"` CanonicalCode *int32 `protobuf:"varint,3,opt,name=canonical_code,json=canonicalCode" json:"canonical_code,omitempty"` } func (x *RequestStatus) Reset() { *x = RequestStatus{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RequestStatus) String() string { return protoimpl.X.MessageStringOf(x) } func (*RequestStatus) ProtoMessage() {} func (x *RequestStatus) ProtoReflect() protoreflect.Message { mi := &file_search_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 RequestStatus.ProtoReflect.Descriptor instead. func (*RequestStatus) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{12} } func (x *RequestStatus) GetCode() SearchServiceError_ErrorCode { if x != nil && x.Code != nil { return *x.Code } return SearchServiceError_OK } func (x *RequestStatus) GetErrorDetail() string { if x != nil && x.ErrorDetail != nil { return *x.ErrorDetail } return "" } func (x *RequestStatus) GetCanonicalCode() int32 { if x != nil && x.CanonicalCode != nil { return *x.CanonicalCode } return 0 } type IndexSpec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Consistency *IndexSpec_Consistency `protobuf:"varint,2,opt,name=consistency,enum=search.v2.IndexSpec_Consistency,def=1" json:"consistency,omitempty"` Namespace *string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"` Version *int32 `protobuf:"varint,4,opt,name=version" json:"version,omitempty"` Source *IndexSpec_Source `protobuf:"varint,5,opt,name=source,enum=search.v2.IndexSpec_Source,def=0" json:"source,omitempty"` Mode *IndexSpec_Mode `protobuf:"varint,6,opt,name=mode,enum=search.v2.IndexSpec_Mode,def=0" json:"mode,omitempty"` } // Default values for IndexSpec fields. const ( Default_IndexSpec_Consistency = IndexSpec_PER_DOCUMENT Default_IndexSpec_Source = IndexSpec_SEARCH Default_IndexSpec_Mode = IndexSpec_PRIORITY ) func (x *IndexSpec) Reset() { *x = IndexSpec{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexSpec) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexSpec) ProtoMessage() {} func (x *IndexSpec) ProtoReflect() protoreflect.Message { mi := &file_search_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 IndexSpec.ProtoReflect.Descriptor instead. func (*IndexSpec) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{13} } func (x *IndexSpec) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *IndexSpec) GetConsistency() IndexSpec_Consistency { if x != nil && x.Consistency != nil { return *x.Consistency } return Default_IndexSpec_Consistency } func (x *IndexSpec) GetNamespace() string { if x != nil && x.Namespace != nil { return *x.Namespace } return "" } func (x *IndexSpec) GetVersion() int32 { if x != nil && x.Version != nil { return *x.Version } return 0 } func (x *IndexSpec) GetSource() IndexSpec_Source { if x != nil && x.Source != nil { return *x.Source } return Default_IndexSpec_Source } func (x *IndexSpec) GetMode() IndexSpec_Mode { if x != nil && x.Mode != nil { return *x.Mode } return Default_IndexSpec_Mode } type IndexMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields IndexSpec *IndexSpec `protobuf:"bytes,1,req,name=index_spec,json=indexSpec" json:"index_spec,omitempty"` Field []*FieldTypes `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` Storage *IndexMetadata_Storage `protobuf:"bytes,3,opt,name=storage" json:"storage,omitempty"` } func (x *IndexMetadata) Reset() { *x = IndexMetadata{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexMetadata) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexMetadata) ProtoMessage() {} func (x *IndexMetadata) ProtoReflect() protoreflect.Message { mi := &file_search_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 IndexMetadata.ProtoReflect.Descriptor instead. func (*IndexMetadata) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{14} } func (x *IndexMetadata) GetIndexSpec() *IndexSpec { if x != nil { return x.IndexSpec } return nil } func (x *IndexMetadata) GetField() []*FieldTypes { if x != nil { return x.Field } return nil } func (x *IndexMetadata) GetStorage() *IndexMetadata_Storage { if x != nil { return x.Storage } return nil } type IndexDocumentParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Document []*Document `protobuf:"bytes,1,rep,name=document" json:"document,omitempty"` // Deprecated: Do not use. Freshness *IndexDocumentParams_Freshness `protobuf:"varint,2,opt,name=freshness,enum=search.v2.IndexDocumentParams_Freshness,def=0" json:"freshness,omitempty"` IndexSpec *IndexSpec `protobuf:"bytes,3,req,name=index_spec,json=indexSpec" json:"index_spec,omitempty"` } // Default values for IndexDocumentParams fields. const ( Default_IndexDocumentParams_Freshness = IndexDocumentParams_SYNCHRONOUSLY ) func (x *IndexDocumentParams) Reset() { *x = IndexDocumentParams{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexDocumentParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexDocumentParams) ProtoMessage() {} func (x *IndexDocumentParams) ProtoReflect() protoreflect.Message { mi := &file_search_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 IndexDocumentParams.ProtoReflect.Descriptor instead. func (*IndexDocumentParams) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{15} } func (x *IndexDocumentParams) GetDocument() []*Document { if x != nil { return x.Document } return nil } // Deprecated: Do not use. func (x *IndexDocumentParams) GetFreshness() IndexDocumentParams_Freshness { if x != nil && x.Freshness != nil { return *x.Freshness } return Default_IndexDocumentParams_Freshness } func (x *IndexDocumentParams) GetIndexSpec() *IndexSpec { if x != nil { return x.IndexSpec } return nil } type IndexDocumentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *IndexDocumentParams `protobuf:"bytes,1,req,name=params" json:"params,omitempty"` AppId []byte `protobuf:"bytes,3,opt,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *IndexDocumentRequest) Reset() { *x = IndexDocumentRequest{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexDocumentRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexDocumentRequest) ProtoMessage() {} func (x *IndexDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_search_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 IndexDocumentRequest.ProtoReflect.Descriptor instead. func (*IndexDocumentRequest) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{16} } func (x *IndexDocumentRequest) GetParams() *IndexDocumentParams { if x != nil { return x.Params } return nil } func (x *IndexDocumentRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type IndexDocumentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status []*RequestStatus `protobuf:"bytes,1,rep,name=status" json:"status,omitempty"` DocId []string `protobuf:"bytes,2,rep,name=doc_id,json=docId" json:"doc_id,omitempty"` } func (x *IndexDocumentResponse) Reset() { *x = IndexDocumentResponse{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexDocumentResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexDocumentResponse) ProtoMessage() {} func (x *IndexDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_search_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 IndexDocumentResponse.ProtoReflect.Descriptor instead. func (*IndexDocumentResponse) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{17} } func (x *IndexDocumentResponse) GetStatus() []*RequestStatus { if x != nil { return x.Status } return nil } func (x *IndexDocumentResponse) GetDocId() []string { if x != nil { return x.DocId } return nil } type DeleteDocumentParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DocId []string `protobuf:"bytes,1,rep,name=doc_id,json=docId" json:"doc_id,omitempty"` IndexSpec *IndexSpec `protobuf:"bytes,2,req,name=index_spec,json=indexSpec" json:"index_spec,omitempty"` } func (x *DeleteDocumentParams) Reset() { *x = DeleteDocumentParams{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteDocumentParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteDocumentParams) ProtoMessage() {} func (x *DeleteDocumentParams) ProtoReflect() protoreflect.Message { mi := &file_search_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 DeleteDocumentParams.ProtoReflect.Descriptor instead. func (*DeleteDocumentParams) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{18} } func (x *DeleteDocumentParams) GetDocId() []string { if x != nil { return x.DocId } return nil } func (x *DeleteDocumentParams) GetIndexSpec() *IndexSpec { if x != nil { return x.IndexSpec } return nil } type DeleteDocumentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *DeleteDocumentParams `protobuf:"bytes,1,req,name=params" json:"params,omitempty"` AppId []byte `protobuf:"bytes,3,opt,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteDocumentRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_search_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 DeleteDocumentRequest.ProtoReflect.Descriptor instead. func (*DeleteDocumentRequest) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{19} } func (x *DeleteDocumentRequest) GetParams() *DeleteDocumentParams { if x != nil { return x.Params } return nil } func (x *DeleteDocumentRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type DeleteDocumentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status []*RequestStatus `protobuf:"bytes,1,rep,name=status" json:"status,omitempty"` } func (x *DeleteDocumentResponse) Reset() { *x = DeleteDocumentResponse{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteDocumentResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteDocumentResponse) ProtoMessage() {} func (x *DeleteDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_search_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 DeleteDocumentResponse.ProtoReflect.Descriptor instead. func (*DeleteDocumentResponse) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{20} } func (x *DeleteDocumentResponse) GetStatus() []*RequestStatus { if x != nil { return x.Status } return nil } type ListDocumentsParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields IndexSpec *IndexSpec `protobuf:"bytes,1,req,name=index_spec,json=indexSpec" json:"index_spec,omitempty"` StartDocId *string `protobuf:"bytes,2,opt,name=start_doc_id,json=startDocId" json:"start_doc_id,omitempty"` IncludeStartDoc *bool `protobuf:"varint,3,opt,name=include_start_doc,json=includeStartDoc,def=1" json:"include_start_doc,omitempty"` Limit *int32 `protobuf:"varint,4,opt,name=limit,def=100" json:"limit,omitempty"` KeysOnly *bool `protobuf:"varint,5,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` } // Default values for ListDocumentsParams fields. const ( Default_ListDocumentsParams_IncludeStartDoc = bool(true) Default_ListDocumentsParams_Limit = int32(100) ) func (x *ListDocumentsParams) Reset() { *x = ListDocumentsParams{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListDocumentsParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListDocumentsParams) ProtoMessage() {} func (x *ListDocumentsParams) ProtoReflect() protoreflect.Message { mi := &file_search_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 ListDocumentsParams.ProtoReflect.Descriptor instead. func (*ListDocumentsParams) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{21} } func (x *ListDocumentsParams) GetIndexSpec() *IndexSpec { if x != nil { return x.IndexSpec } return nil } func (x *ListDocumentsParams) GetStartDocId() string { if x != nil && x.StartDocId != nil { return *x.StartDocId } return "" } func (x *ListDocumentsParams) GetIncludeStartDoc() bool { if x != nil && x.IncludeStartDoc != nil { return *x.IncludeStartDoc } return Default_ListDocumentsParams_IncludeStartDoc } func (x *ListDocumentsParams) GetLimit() int32 { if x != nil && x.Limit != nil { return *x.Limit } return Default_ListDocumentsParams_Limit } func (x *ListDocumentsParams) GetKeysOnly() bool { if x != nil && x.KeysOnly != nil { return *x.KeysOnly } return false } type ListDocumentsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *ListDocumentsParams `protobuf:"bytes,1,req,name=params" json:"params,omitempty"` AppId []byte `protobuf:"bytes,2,opt,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListDocumentsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_search_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 ListDocumentsRequest.ProtoReflect.Descriptor instead. func (*ListDocumentsRequest) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{22} } func (x *ListDocumentsRequest) GetParams() *ListDocumentsParams { if x != nil { return x.Params } return nil } func (x *ListDocumentsRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type ListDocumentsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *RequestStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` Document []*Document `protobuf:"bytes,2,rep,name=document" json:"document,omitempty"` } func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListDocumentsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_search_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 ListDocumentsResponse.ProtoReflect.Descriptor instead. func (*ListDocumentsResponse) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{23} } func (x *ListDocumentsResponse) GetStatus() *RequestStatus { if x != nil { return x.Status } return nil } func (x *ListDocumentsResponse) GetDocument() []*Document { if x != nil { return x.Document } return nil } type ListIndexesParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields FetchSchema *bool `protobuf:"varint,1,opt,name=fetch_schema,json=fetchSchema" json:"fetch_schema,omitempty"` Limit *int32 `protobuf:"varint,2,opt,name=limit,def=20" json:"limit,omitempty"` Namespace *string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"` StartIndexName *string `protobuf:"bytes,4,opt,name=start_index_name,json=startIndexName" json:"start_index_name,omitempty"` IncludeStartIndex *bool `protobuf:"varint,5,opt,name=include_start_index,json=includeStartIndex,def=1" json:"include_start_index,omitempty"` IndexNamePrefix *string `protobuf:"bytes,6,opt,name=index_name_prefix,json=indexNamePrefix" json:"index_name_prefix,omitempty"` Offset *int32 `protobuf:"varint,7,opt,name=offset" json:"offset,omitempty"` Source *IndexSpec_Source `protobuf:"varint,8,opt,name=source,enum=search.v2.IndexSpec_Source,def=0" json:"source,omitempty"` } // Default values for ListIndexesParams fields. const ( Default_ListIndexesParams_Limit = int32(20) Default_ListIndexesParams_IncludeStartIndex = bool(true) Default_ListIndexesParams_Source = IndexSpec_SEARCH ) func (x *ListIndexesParams) Reset() { *x = ListIndexesParams{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListIndexesParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListIndexesParams) ProtoMessage() {} func (x *ListIndexesParams) ProtoReflect() protoreflect.Message { mi := &file_search_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 ListIndexesParams.ProtoReflect.Descriptor instead. func (*ListIndexesParams) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{24} } func (x *ListIndexesParams) GetFetchSchema() bool { if x != nil && x.FetchSchema != nil { return *x.FetchSchema } return false } func (x *ListIndexesParams) GetLimit() int32 { if x != nil && x.Limit != nil { return *x.Limit } return Default_ListIndexesParams_Limit } func (x *ListIndexesParams) GetNamespace() string { if x != nil && x.Namespace != nil { return *x.Namespace } return "" } func (x *ListIndexesParams) GetStartIndexName() string { if x != nil && x.StartIndexName != nil { return *x.StartIndexName } return "" } func (x *ListIndexesParams) GetIncludeStartIndex() bool { if x != nil && x.IncludeStartIndex != nil { return *x.IncludeStartIndex } return Default_ListIndexesParams_IncludeStartIndex } func (x *ListIndexesParams) GetIndexNamePrefix() string { if x != nil && x.IndexNamePrefix != nil { return *x.IndexNamePrefix } return "" } func (x *ListIndexesParams) GetOffset() int32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } func (x *ListIndexesParams) GetSource() IndexSpec_Source { if x != nil && x.Source != nil { return *x.Source } return Default_ListIndexesParams_Source } type ListIndexesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *ListIndexesParams `protobuf:"bytes,1,req,name=params" json:"params,omitempty"` AppId []byte `protobuf:"bytes,3,opt,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *ListIndexesRequest) Reset() { *x = ListIndexesRequest{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListIndexesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListIndexesRequest) ProtoMessage() {} func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { mi := &file_search_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 ListIndexesRequest.ProtoReflect.Descriptor instead. func (*ListIndexesRequest) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{25} } func (x *ListIndexesRequest) GetParams() *ListIndexesParams { if x != nil { return x.Params } return nil } func (x *ListIndexesRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type ListIndexesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *RequestStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` IndexMetadata []*IndexMetadata `protobuf:"bytes,2,rep,name=index_metadata,json=indexMetadata" json:"index_metadata,omitempty"` } func (x *ListIndexesResponse) Reset() { *x = ListIndexesResponse{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListIndexesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListIndexesResponse) ProtoMessage() {} func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { mi := &file_search_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 ListIndexesResponse.ProtoReflect.Descriptor instead. func (*ListIndexesResponse) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{26} } func (x *ListIndexesResponse) GetStatus() *RequestStatus { if x != nil { return x.Status } return nil } func (x *ListIndexesResponse) GetIndexMetadata() []*IndexMetadata { if x != nil { return x.IndexMetadata } return nil } type DeleteSchemaParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Source *IndexSpec_Source `protobuf:"varint,1,opt,name=source,enum=search.v2.IndexSpec_Source,def=0" json:"source,omitempty"` IndexSpec []*IndexSpec `protobuf:"bytes,2,rep,name=index_spec,json=indexSpec" json:"index_spec,omitempty"` } // Default values for DeleteSchemaParams fields. const ( Default_DeleteSchemaParams_Source = IndexSpec_SEARCH ) func (x *DeleteSchemaParams) Reset() { *x = DeleteSchemaParams{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteSchemaParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteSchemaParams) ProtoMessage() {} func (x *DeleteSchemaParams) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DeleteSchemaParams.ProtoReflect.Descriptor instead. func (*DeleteSchemaParams) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{27} } func (x *DeleteSchemaParams) GetSource() IndexSpec_Source { if x != nil && x.Source != nil { return *x.Source } return Default_DeleteSchemaParams_Source } func (x *DeleteSchemaParams) GetIndexSpec() []*IndexSpec { if x != nil { return x.IndexSpec } return nil } type DeleteSchemaRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *DeleteSchemaParams `protobuf:"bytes,1,req,name=params" json:"params,omitempty"` AppId []byte `protobuf:"bytes,3,opt,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *DeleteSchemaRequest) Reset() { *x = DeleteSchemaRequest{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteSchemaRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteSchemaRequest) ProtoMessage() {} func (x *DeleteSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DeleteSchemaRequest.ProtoReflect.Descriptor instead. func (*DeleteSchemaRequest) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{28} } func (x *DeleteSchemaRequest) GetParams() *DeleteSchemaParams { if x != nil { return x.Params } return nil } func (x *DeleteSchemaRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type DeleteSchemaResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status []*RequestStatus `protobuf:"bytes,1,rep,name=status" json:"status,omitempty"` } func (x *DeleteSchemaResponse) Reset() { *x = DeleteSchemaResponse{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DeleteSchemaResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DeleteSchemaResponse) ProtoMessage() {} func (x *DeleteSchemaResponse) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DeleteSchemaResponse.ProtoReflect.Descriptor instead. func (*DeleteSchemaResponse) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{29} } func (x *DeleteSchemaResponse) GetStatus() []*RequestStatus { if x != nil { return x.Status } return nil } type SortSpec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SortExpression *string `protobuf:"bytes,1,req,name=sort_expression,json=sortExpression" json:"sort_expression,omitempty"` SortDescending *bool `protobuf:"varint,2,opt,name=sort_descending,json=sortDescending,def=1" json:"sort_descending,omitempty"` DefaultValueText *string `protobuf:"bytes,4,opt,name=default_value_text,json=defaultValueText" json:"default_value_text,omitempty"` DefaultValueNumeric *float64 `protobuf:"fixed64,5,opt,name=default_value_numeric,json=defaultValueNumeric" json:"default_value_numeric,omitempty"` } // Default values for SortSpec fields. const ( Default_SortSpec_SortDescending = bool(true) ) func (x *SortSpec) Reset() { *x = SortSpec{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SortSpec) String() string { return protoimpl.X.MessageStringOf(x) } func (*SortSpec) ProtoMessage() {} func (x *SortSpec) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SortSpec.ProtoReflect.Descriptor instead. func (*SortSpec) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{30} } func (x *SortSpec) GetSortExpression() string { if x != nil && x.SortExpression != nil { return *x.SortExpression } return "" } func (x *SortSpec) GetSortDescending() bool { if x != nil && x.SortDescending != nil { return *x.SortDescending } return Default_SortSpec_SortDescending } func (x *SortSpec) GetDefaultValueText() string { if x != nil && x.DefaultValueText != nil { return *x.DefaultValueText } return "" } func (x *SortSpec) GetDefaultValueNumeric() float64 { if x != nil && x.DefaultValueNumeric != nil { return *x.DefaultValueNumeric } return 0 } type ScorerSpec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Scorer *ScorerSpec_Scorer `protobuf:"varint,1,opt,name=scorer,enum=search.v2.ScorerSpec_Scorer,def=2" json:"scorer,omitempty"` Limit *int32 `protobuf:"varint,2,opt,name=limit,def=1000" json:"limit,omitempty"` MatchScorerParameters *string `protobuf:"bytes,9,opt,name=match_scorer_parameters,json=matchScorerParameters" json:"match_scorer_parameters,omitempty"` } // Default values for ScorerSpec fields. const ( Default_ScorerSpec_Scorer = ScorerSpec_MATCH_SCORER Default_ScorerSpec_Limit = int32(1000) ) func (x *ScorerSpec) Reset() { *x = ScorerSpec{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ScorerSpec) String() string { return protoimpl.X.MessageStringOf(x) } func (*ScorerSpec) ProtoMessage() {} func (x *ScorerSpec) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ScorerSpec.ProtoReflect.Descriptor instead. func (*ScorerSpec) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{31} } func (x *ScorerSpec) GetScorer() ScorerSpec_Scorer { if x != nil && x.Scorer != nil { return *x.Scorer } return Default_ScorerSpec_Scorer } func (x *ScorerSpec) GetLimit() int32 { if x != nil && x.Limit != nil { return *x.Limit } return Default_ScorerSpec_Limit } func (x *ScorerSpec) GetMatchScorerParameters() string { if x != nil && x.MatchScorerParameters != nil { return *x.MatchScorerParameters } return "" } type FieldSpec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name []string `protobuf:"bytes,1,rep,name=name" json:"name,omitempty"` Expression []*FieldSpec_Expression `protobuf:"group,2,rep,name=Expression,json=expression" json:"expression,omitempty"` } func (x *FieldSpec) Reset() { *x = FieldSpec{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FieldSpec) String() string { return protoimpl.X.MessageStringOf(x) } func (*FieldSpec) ProtoMessage() {} func (x *FieldSpec) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FieldSpec.ProtoReflect.Descriptor instead. func (*FieldSpec) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{32} } func (x *FieldSpec) GetName() []string { if x != nil { return x.Name } return nil } func (x *FieldSpec) GetExpression() []*FieldSpec_Expression { if x != nil { return x.Expression } return nil } type FacetRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Start *string `protobuf:"bytes,2,opt,name=start" json:"start,omitempty"` End *string `protobuf:"bytes,3,opt,name=end" json:"end,omitempty"` } func (x *FacetRange) Reset() { *x = FacetRange{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetRange) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetRange) ProtoMessage() {} func (x *FacetRange) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FacetRange.ProtoReflect.Descriptor instead. func (*FacetRange) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{33} } func (x *FacetRange) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FacetRange) GetStart() string { if x != nil && x.Start != nil { return *x.Start } return "" } func (x *FacetRange) GetEnd() string { if x != nil && x.End != nil { return *x.End } return "" } type FacetRequestParam struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ValueLimit *int32 `protobuf:"varint,1,opt,name=value_limit,json=valueLimit" json:"value_limit,omitempty"` Range []*FacetRange `protobuf:"bytes,2,rep,name=range" json:"range,omitempty"` ValueConstraint []string `protobuf:"bytes,3,rep,name=value_constraint,json=valueConstraint" json:"value_constraint,omitempty"` } func (x *FacetRequestParam) Reset() { *x = FacetRequestParam{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetRequestParam) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetRequestParam) ProtoMessage() {} func (x *FacetRequestParam) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FacetRequestParam.ProtoReflect.Descriptor instead. func (*FacetRequestParam) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{34} } func (x *FacetRequestParam) GetValueLimit() int32 { if x != nil && x.ValueLimit != nil { return *x.ValueLimit } return 0 } func (x *FacetRequestParam) GetRange() []*FacetRange { if x != nil { return x.Range } return nil } func (x *FacetRequestParam) GetValueConstraint() []string { if x != nil { return x.ValueConstraint } return nil } type FacetAutoDetectParam struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ValueLimit *int32 `protobuf:"varint,1,opt,name=value_limit,json=valueLimit,def=10" json:"value_limit,omitempty"` } // Default values for FacetAutoDetectParam fields. const ( Default_FacetAutoDetectParam_ValueLimit = int32(10) ) func (x *FacetAutoDetectParam) Reset() { *x = FacetAutoDetectParam{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetAutoDetectParam) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetAutoDetectParam) ProtoMessage() {} func (x *FacetAutoDetectParam) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FacetAutoDetectParam.ProtoReflect.Descriptor instead. func (*FacetAutoDetectParam) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{35} } func (x *FacetAutoDetectParam) GetValueLimit() int32 { if x != nil && x.ValueLimit != nil { return *x.ValueLimit } return Default_FacetAutoDetectParam_ValueLimit } type FacetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Params *FacetRequestParam `protobuf:"bytes,2,opt,name=params" json:"params,omitempty"` } func (x *FacetRequest) Reset() { *x = FacetRequest{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetRequest) ProtoMessage() {} func (x *FacetRequest) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[36] 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 FacetRequest.ProtoReflect.Descriptor instead. func (*FacetRequest) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{36} } func (x *FacetRequest) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FacetRequest) GetParams() *FacetRequestParam { if x != nil { return x.Params } return nil } type FacetRefinement struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` Range *FacetRefinement_Range `protobuf:"bytes,3,opt,name=range" json:"range,omitempty"` } func (x *FacetRefinement) Reset() { *x = FacetRefinement{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetRefinement) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetRefinement) ProtoMessage() {} func (x *FacetRefinement) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[37] 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 FacetRefinement.ProtoReflect.Descriptor instead. func (*FacetRefinement) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{37} } func (x *FacetRefinement) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FacetRefinement) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } func (x *FacetRefinement) GetRange() *FacetRefinement_Range { if x != nil { return x.Range } return nil } type SearchParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields IndexSpec *IndexSpec `protobuf:"bytes,1,req,name=index_spec,json=indexSpec" json:"index_spec,omitempty"` Query *string `protobuf:"bytes,2,req,name=query" json:"query,omitempty"` Cursor *string `protobuf:"bytes,4,opt,name=cursor" json:"cursor,omitempty"` Offset *int32 `protobuf:"varint,11,opt,name=offset" json:"offset,omitempty"` CursorType *SearchParams_CursorType `protobuf:"varint,5,opt,name=cursor_type,json=cursorType,enum=search.v2.SearchParams_CursorType,def=0" json:"cursor_type,omitempty"` Limit *int32 `protobuf:"varint,6,opt,name=limit,def=20" json:"limit,omitempty"` MatchedCountAccuracy *int32 `protobuf:"varint,7,opt,name=matched_count_accuracy,json=matchedCountAccuracy" json:"matched_count_accuracy,omitempty"` SortSpec []*SortSpec `protobuf:"bytes,8,rep,name=sort_spec,json=sortSpec" json:"sort_spec,omitempty"` ScorerSpec *ScorerSpec `protobuf:"bytes,9,opt,name=scorer_spec,json=scorerSpec" json:"scorer_spec,omitempty"` FieldSpec *FieldSpec `protobuf:"bytes,10,opt,name=field_spec,json=fieldSpec" json:"field_spec,omitempty"` KeysOnly *bool `protobuf:"varint,12,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` ParsingMode *SearchParams_ParsingMode `protobuf:"varint,13,opt,name=parsing_mode,json=parsingMode,enum=search.v2.SearchParams_ParsingMode,def=0" json:"parsing_mode,omitempty"` AutoDiscoverFacetCount *int32 `protobuf:"varint,15,opt,name=auto_discover_facet_count,json=autoDiscoverFacetCount,def=0" json:"auto_discover_facet_count,omitempty"` IncludeFacet []*FacetRequest `protobuf:"bytes,16,rep,name=include_facet,json=includeFacet" json:"include_facet,omitempty"` FacetRefinement []*FacetRefinement `protobuf:"bytes,17,rep,name=facet_refinement,json=facetRefinement" json:"facet_refinement,omitempty"` FacetAutoDetectParam *FacetAutoDetectParam `protobuf:"bytes,18,opt,name=facet_auto_detect_param,json=facetAutoDetectParam" json:"facet_auto_detect_param,omitempty"` FacetDepth *int32 `protobuf:"varint,19,opt,name=facet_depth,json=facetDepth,def=1000" json:"facet_depth,omitempty"` } // Default values for SearchParams fields. const ( Default_SearchParams_CursorType = SearchParams_NONE Default_SearchParams_Limit = int32(20) Default_SearchParams_ParsingMode = SearchParams_STRICT Default_SearchParams_AutoDiscoverFacetCount = int32(0) Default_SearchParams_FacetDepth = int32(1000) ) func (x *SearchParams) Reset() { *x = SearchParams{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SearchParams) String() string { return protoimpl.X.MessageStringOf(x) } func (*SearchParams) ProtoMessage() {} func (x *SearchParams) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[38] 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 SearchParams.ProtoReflect.Descriptor instead. func (*SearchParams) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{38} } func (x *SearchParams) GetIndexSpec() *IndexSpec { if x != nil { return x.IndexSpec } return nil } func (x *SearchParams) GetQuery() string { if x != nil && x.Query != nil { return *x.Query } return "" } func (x *SearchParams) GetCursor() string { if x != nil && x.Cursor != nil { return *x.Cursor } return "" } func (x *SearchParams) GetOffset() int32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } func (x *SearchParams) GetCursorType() SearchParams_CursorType { if x != nil && x.CursorType != nil { return *x.CursorType } return Default_SearchParams_CursorType } func (x *SearchParams) GetLimit() int32 { if x != nil && x.Limit != nil { return *x.Limit } return Default_SearchParams_Limit } func (x *SearchParams) GetMatchedCountAccuracy() int32 { if x != nil && x.MatchedCountAccuracy != nil { return *x.MatchedCountAccuracy } return 0 } func (x *SearchParams) GetSortSpec() []*SortSpec { if x != nil { return x.SortSpec } return nil } func (x *SearchParams) GetScorerSpec() *ScorerSpec { if x != nil { return x.ScorerSpec } return nil } func (x *SearchParams) GetFieldSpec() *FieldSpec { if x != nil { return x.FieldSpec } return nil } func (x *SearchParams) GetKeysOnly() bool { if x != nil && x.KeysOnly != nil { return *x.KeysOnly } return false } func (x *SearchParams) GetParsingMode() SearchParams_ParsingMode { if x != nil && x.ParsingMode != nil { return *x.ParsingMode } return Default_SearchParams_ParsingMode } func (x *SearchParams) GetAutoDiscoverFacetCount() int32 { if x != nil && x.AutoDiscoverFacetCount != nil { return *x.AutoDiscoverFacetCount } return Default_SearchParams_AutoDiscoverFacetCount } func (x *SearchParams) GetIncludeFacet() []*FacetRequest { if x != nil { return x.IncludeFacet } return nil } func (x *SearchParams) GetFacetRefinement() []*FacetRefinement { if x != nil { return x.FacetRefinement } return nil } func (x *SearchParams) GetFacetAutoDetectParam() *FacetAutoDetectParam { if x != nil { return x.FacetAutoDetectParam } return nil } func (x *SearchParams) GetFacetDepth() int32 { if x != nil && x.FacetDepth != nil { return *x.FacetDepth } return Default_SearchParams_FacetDepth } type SearchRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Params *SearchParams `protobuf:"bytes,1,req,name=params" json:"params,omitempty"` AppId []byte `protobuf:"bytes,3,opt,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *SearchRequest) Reset() { *x = SearchRequest{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SearchRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. func (*SearchRequest) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{39} } func (x *SearchRequest) GetParams() *SearchParams { if x != nil { return x.Params } return nil } func (x *SearchRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type FacetResultValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Count *int32 `protobuf:"varint,2,req,name=count" json:"count,omitempty"` Refinement *FacetRefinement `protobuf:"bytes,3,req,name=refinement" json:"refinement,omitempty"` } func (x *FacetResultValue) Reset() { *x = FacetResultValue{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetResultValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetResultValue) ProtoMessage() {} func (x *FacetResultValue) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[40] 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 FacetResultValue.ProtoReflect.Descriptor instead. func (*FacetResultValue) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{40} } func (x *FacetResultValue) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FacetResultValue) GetCount() int32 { if x != nil && x.Count != nil { return *x.Count } return 0 } func (x *FacetResultValue) GetRefinement() *FacetRefinement { if x != nil { return x.Refinement } return nil } type FacetResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Value []*FacetResultValue `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` } func (x *FacetResult) Reset() { *x = FacetResult{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetResult) ProtoMessage() {} func (x *FacetResult) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[41] 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 FacetResult.ProtoReflect.Descriptor instead. func (*FacetResult) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{41} } func (x *FacetResult) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FacetResult) GetValue() []*FacetResultValue { if x != nil { return x.Value } return nil } type SearchResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Document *Document `protobuf:"bytes,1,req,name=document" json:"document,omitempty"` Expression []*Field `protobuf:"bytes,4,rep,name=expression" json:"expression,omitempty"` Score []float64 `protobuf:"fixed64,2,rep,name=score" json:"score,omitempty"` Cursor *string `protobuf:"bytes,3,opt,name=cursor" json:"cursor,omitempty"` } func (x *SearchResult) Reset() { *x = SearchResult{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SearchResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*SearchResult) ProtoMessage() {} func (x *SearchResult) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[42] 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 SearchResult.ProtoReflect.Descriptor instead. func (*SearchResult) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{42} } func (x *SearchResult) GetDocument() *Document { if x != nil { return x.Document } return nil } func (x *SearchResult) GetExpression() []*Field { if x != nil { return x.Expression } return nil } func (x *SearchResult) GetScore() []float64 { if x != nil { return x.Score } return nil } func (x *SearchResult) GetCursor() string { if x != nil && x.Cursor != nil { return *x.Cursor } return "" } type SearchResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields Result []*SearchResult `protobuf:"bytes,1,rep,name=result" json:"result,omitempty"` MatchedCount *int64 `protobuf:"varint,2,req,name=matched_count,json=matchedCount" json:"matched_count,omitempty"` Status *RequestStatus `protobuf:"bytes,3,req,name=status" json:"status,omitempty"` Cursor *string `protobuf:"bytes,4,opt,name=cursor" json:"cursor,omitempty"` FacetResult []*FacetResult `protobuf:"bytes,5,rep,name=facet_result,json=facetResult" json:"facet_result,omitempty"` } func (x *SearchResponse) Reset() { *x = SearchResponse{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SearchResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead. func (*SearchResponse) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{43} } var extRange_SearchResponse = []protoiface.ExtensionRangeV1{ {Start: 1000, End: 9999}, } // Deprecated: Use SearchResponse.ProtoReflect.Descriptor.ExtensionRanges instead. func (*SearchResponse) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { return extRange_SearchResponse } func (x *SearchResponse) GetResult() []*SearchResult { if x != nil { return x.Result } return nil } func (x *SearchResponse) GetMatchedCount() int64 { if x != nil && x.MatchedCount != nil { return *x.MatchedCount } return 0 } func (x *SearchResponse) GetStatus() *RequestStatus { if x != nil { return x.Status } return nil } func (x *SearchResponse) GetCursor() string { if x != nil && x.Cursor != nil { return *x.Cursor } return "" } func (x *SearchResponse) GetFacetResult() []*FacetResult { if x != nil { return x.FacetResult } return nil } type FieldValue_Geo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Lat *float64 `protobuf:"fixed64,5,req,name=lat" json:"lat,omitempty"` Lng *float64 `protobuf:"fixed64,6,req,name=lng" json:"lng,omitempty"` } func (x *FieldValue_Geo) Reset() { *x = FieldValue_Geo{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FieldValue_Geo) String() string { return protoimpl.X.MessageStringOf(x) } func (*FieldValue_Geo) ProtoMessage() {} func (x *FieldValue_Geo) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[44] 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 FieldValue_Geo.ProtoReflect.Descriptor instead. func (*FieldValue_Geo) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{3, 0} } func (x *FieldValue_Geo) GetLat() float64 { if x != nil && x.Lat != nil { return *x.Lat } return 0 } func (x *FieldValue_Geo) GetLng() float64 { if x != nil && x.Lng != nil { return *x.Lng } return 0 } type IndexMetadata_Storage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AmountUsed *int64 `protobuf:"varint,1,opt,name=amount_used,json=amountUsed" json:"amount_used,omitempty"` Limit *int64 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"` } func (x *IndexMetadata_Storage) Reset() { *x = IndexMetadata_Storage{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexMetadata_Storage) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexMetadata_Storage) ProtoMessage() {} func (x *IndexMetadata_Storage) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[45] 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 IndexMetadata_Storage.ProtoReflect.Descriptor instead. func (*IndexMetadata_Storage) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{14, 0} } func (x *IndexMetadata_Storage) GetAmountUsed() int64 { if x != nil && x.AmountUsed != nil { return *x.AmountUsed } return 0 } func (x *IndexMetadata_Storage) GetLimit() int64 { if x != nil && x.Limit != nil { return *x.Limit } return 0 } type FieldSpec_Expression struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` Expression *string `protobuf:"bytes,4,req,name=expression" json:"expression,omitempty"` } func (x *FieldSpec_Expression) Reset() { *x = FieldSpec_Expression{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FieldSpec_Expression) String() string { return protoimpl.X.MessageStringOf(x) } func (*FieldSpec_Expression) ProtoMessage() {} func (x *FieldSpec_Expression) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[46] 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 FieldSpec_Expression.ProtoReflect.Descriptor instead. func (*FieldSpec_Expression) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{32, 0} } func (x *FieldSpec_Expression) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } func (x *FieldSpec_Expression) GetExpression() string { if x != nil && x.Expression != nil { return *x.Expression } return "" } type FacetRefinement_Range struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Start *string `protobuf:"bytes,1,opt,name=start" json:"start,omitempty"` End *string `protobuf:"bytes,2,opt,name=end" json:"end,omitempty"` } func (x *FacetRefinement_Range) Reset() { *x = FacetRefinement_Range{} if protoimpl.UnsafeEnabled { mi := &file_search_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FacetRefinement_Range) String() string { return protoimpl.X.MessageStringOf(x) } func (*FacetRefinement_Range) ProtoMessage() {} func (x *FacetRefinement_Range) ProtoReflect() protoreflect.Message { mi := &file_search_proto_msgTypes[47] 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 FacetRefinement_Range.ProtoReflect.Descriptor instead. func (*FacetRefinement_Range) Descriptor() ([]byte, []int) { return file_search_proto_rawDescGZIP(), []int{37, 0} } func (x *FacetRefinement_Range) GetStart() string { if x != nil && x.Start != nil { return *x.Start } return "" } func (x *FacetRefinement_Range) GetEnd() string { if x != nil && x.End != nil { return *x.End } return "" } var File_search_proto protoreflect.FileDescriptor var file_search_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x22, 0xee, 0x01, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x49, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, 0x5f, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, 0x5f, 0x44, 0x4f, 0x4d, 0x41, 0x49, 0x4e, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x4c, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x10, 0x06, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x4c, 0x4c, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x10, 0x07, 0x22, 0xc4, 0x01, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x10, 0x03, 0x22, 0x55, 0x0a, 0x11, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xb0, 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x02, 0x65, 0x6e, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x67, 0x65, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x47, 0x65, 0x6f, 0x52, 0x03, 0x67, 0x65, 0x6f, 0x1a, 0x29, 0x0a, 0x03, 0x47, 0x65, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x05, 0x20, 0x02, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x02, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x6e, 0x67, 0x22, 0x4a, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x4d, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x54, 0x4f, 0x4d, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x4f, 0x10, 0x05, 0x22, 0x48, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x57, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x4e, 0x75, 0x6d, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x3a, 0x01, 0x31, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x18, 0x70, 0x72, 0x65, 0x76, 0x4e, 0x75, 0x6d, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x22, 0x91, 0x01, 0x0a, 0x0a, 0x46, 0x61, 0x63, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x04, 0x41, 0x54, 0x4f, 0x4d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x54, 0x4f, 0x4d, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x04, 0x22, 0x48, 0x0a, 0x05, 0x46, 0x61, 0x63, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5e, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x53, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfa, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x02, 0x65, 0x6e, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, 0x53, 0x55, 0x50, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x3a, 0x04, 0x44, 0x49, 0x53, 0x4b, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x66, 0x61, 0x63, 0x65, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x05, 0x66, 0x61, 0x63, 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x55, 0x50, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x10, 0x01, 0x22, 0x13, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x53, 0x4b, 0x10, 0x00, 0x22, 0xa8, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x22, 0x96, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x22, 0xaa, 0x03, 0x0a, 0x09, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x3a, 0x0c, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x06, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x08, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x22, 0x36, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x41, 0x54, 0x41, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x10, 0x02, 0x22, 0x24, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x41, 0x43, 0x4b, 0x47, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x22, 0xef, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x1a, 0x40, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x8b, 0x02, 0x0a, 0x13, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x09, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x46, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x73, 0x73, 0x3a, 0x0d, 0x53, 0x59, 0x4e, 0x43, 0x48, 0x52, 0x4f, 0x4e, 0x4f, 0x55, 0x53, 0x4c, 0x59, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x22, 0x33, 0x0a, 0x09, 0x46, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x59, 0x4e, 0x43, 0x48, 0x52, 0x4f, 0x4e, 0x4f, 0x55, 0x53, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x57, 0x48, 0x45, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x4e, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x22, 0x65, 0x0a, 0x14, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x15, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x64, 0x6f, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x64, 0x6f, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x22, 0x67, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x6f, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x6f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x03, 0x31, 0x30, 0x30, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x65, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xcf, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x65, 0x74, 0x63, 0x68, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x02, 0x32, 0x30, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x06, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x61, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x0e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x06, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x22, 0x63, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x72, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x0f, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x73, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x65, 0x78, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x22, 0xdc, 0x01, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x3a, 0x0c, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x52, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x04, 0x31, 0x30, 0x30, 0x30, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x36, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x53, 0x43, 0x4f, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x52, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x52, 0x10, 0x02, 0x22, 0xa2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x1f, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x40, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x0a, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x46, 0x61, 0x63, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x23, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x02, 0x31, 0x30, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x58, 0x0a, 0x0c, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x0f, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0x2f, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xce, 0x07, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x02, 0x32, 0x30, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x0b, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x4e, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x16, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x46, 0x61, 0x63, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x61, 0x63, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x66, 0x61, 0x63, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x17, 0x66, 0x61, 0x63, 0x65, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x14, 0x66, 0x61, 0x63, 0x65, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x25, 0x0a, 0x0b, 0x66, 0x61, 0x63, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x04, 0x31, 0x30, 0x30, 0x30, 0x52, 0x0a, 0x66, 0x61, 0x63, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x22, 0x32, 0x0a, 0x0a, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x02, 0x22, 0x26, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x4c, 0x41, 0x58, 0x45, 0x44, 0x10, 0x01, 0x22, 0x57, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x78, 0x0a, 0x10, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x54, 0x0a, 0x0b, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xf3, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x39, 0x0a, 0x0c, 0x66, 0x61, 0x63, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0b, 0x66, 0x61, 0x63, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x90, 0x4e, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, } var ( file_search_proto_rawDescOnce sync.Once file_search_proto_rawDescData = file_search_proto_rawDesc ) func file_search_proto_rawDescGZIP() []byte { file_search_proto_rawDescOnce.Do(func() { file_search_proto_rawDescData = protoimpl.X.CompressGZIP(file_search_proto_rawDescData) }) return file_search_proto_rawDescData } var file_search_proto_enumTypes = make([]protoimpl.EnumInfo, 14) var file_search_proto_msgTypes = make([]protoimpl.MessageInfo, 48) var file_search_proto_goTypes = []interface{}{ (Scope_Type)(0), // 0: search.v2.Scope.Type (Entry_Permission)(0), // 1: search.v2.Entry.Permission (FieldValue_ContentType)(0), // 2: search.v2.FieldValue.ContentType (FacetValue_ContentType)(0), // 3: search.v2.FacetValue.ContentType (Document_OrderIdSource)(0), // 4: search.v2.Document.OrderIdSource (Document_Storage)(0), // 5: search.v2.Document.Storage (SearchServiceError_ErrorCode)(0), // 6: search.v2.SearchServiceError.ErrorCode (IndexSpec_Consistency)(0), // 7: search.v2.IndexSpec.Consistency (IndexSpec_Source)(0), // 8: search.v2.IndexSpec.Source (IndexSpec_Mode)(0), // 9: search.v2.IndexSpec.Mode (IndexDocumentParams_Freshness)(0), // 10: search.v2.IndexDocumentParams.Freshness (ScorerSpec_Scorer)(0), // 11: search.v2.ScorerSpec.Scorer (SearchParams_CursorType)(0), // 12: search.v2.SearchParams.CursorType (SearchParams_ParsingMode)(0), // 13: search.v2.SearchParams.ParsingMode (*Scope)(nil), // 14: search.v2.Scope (*Entry)(nil), // 15: search.v2.Entry (*AccessControlList)(nil), // 16: search.v2.AccessControlList (*FieldValue)(nil), // 17: search.v2.FieldValue (*Field)(nil), // 18: search.v2.Field (*FieldTypes)(nil), // 19: search.v2.FieldTypes (*IndexShardSettings)(nil), // 20: search.v2.IndexShardSettings (*FacetValue)(nil), // 21: search.v2.FacetValue (*Facet)(nil), // 22: search.v2.Facet (*DocumentMetadata)(nil), // 23: search.v2.DocumentMetadata (*Document)(nil), // 24: search.v2.Document (*SearchServiceError)(nil), // 25: search.v2.SearchServiceError (*RequestStatus)(nil), // 26: search.v2.RequestStatus (*IndexSpec)(nil), // 27: search.v2.IndexSpec (*IndexMetadata)(nil), // 28: search.v2.IndexMetadata (*IndexDocumentParams)(nil), // 29: search.v2.IndexDocumentParams (*IndexDocumentRequest)(nil), // 30: search.v2.IndexDocumentRequest (*IndexDocumentResponse)(nil), // 31: search.v2.IndexDocumentResponse (*DeleteDocumentParams)(nil), // 32: search.v2.DeleteDocumentParams (*DeleteDocumentRequest)(nil), // 33: search.v2.DeleteDocumentRequest (*DeleteDocumentResponse)(nil), // 34: search.v2.DeleteDocumentResponse (*ListDocumentsParams)(nil), // 35: search.v2.ListDocumentsParams (*ListDocumentsRequest)(nil), // 36: search.v2.ListDocumentsRequest (*ListDocumentsResponse)(nil), // 37: search.v2.ListDocumentsResponse (*ListIndexesParams)(nil), // 38: search.v2.ListIndexesParams (*ListIndexesRequest)(nil), // 39: search.v2.ListIndexesRequest (*ListIndexesResponse)(nil), // 40: search.v2.ListIndexesResponse (*DeleteSchemaParams)(nil), // 41: search.v2.DeleteSchemaParams (*DeleteSchemaRequest)(nil), // 42: search.v2.DeleteSchemaRequest (*DeleteSchemaResponse)(nil), // 43: search.v2.DeleteSchemaResponse (*SortSpec)(nil), // 44: search.v2.SortSpec (*ScorerSpec)(nil), // 45: search.v2.ScorerSpec (*FieldSpec)(nil), // 46: search.v2.FieldSpec (*FacetRange)(nil), // 47: search.v2.FacetRange (*FacetRequestParam)(nil), // 48: search.v2.FacetRequestParam (*FacetAutoDetectParam)(nil), // 49: search.v2.FacetAutoDetectParam (*FacetRequest)(nil), // 50: search.v2.FacetRequest (*FacetRefinement)(nil), // 51: search.v2.FacetRefinement (*SearchParams)(nil), // 52: search.v2.SearchParams (*SearchRequest)(nil), // 53: search.v2.SearchRequest (*FacetResultValue)(nil), // 54: search.v2.FacetResultValue (*FacetResult)(nil), // 55: search.v2.FacetResult (*SearchResult)(nil), // 56: search.v2.SearchResult (*SearchResponse)(nil), // 57: search.v2.SearchResponse (*FieldValue_Geo)(nil), // 58: search.v2.FieldValue.Geo (*IndexMetadata_Storage)(nil), // 59: search.v2.IndexMetadata.Storage (*FieldSpec_Expression)(nil), // 60: search.v2.FieldSpec.Expression (*FacetRefinement_Range)(nil), // 61: search.v2.FacetRefinement.Range } var file_search_proto_depIdxs = []int32{ 0, // 0: search.v2.Scope.type:type_name -> search.v2.Scope.Type 14, // 1: search.v2.Entry.scope:type_name -> search.v2.Scope 1, // 2: search.v2.Entry.permission:type_name -> search.v2.Entry.Permission 15, // 3: search.v2.AccessControlList.entries:type_name -> search.v2.Entry 2, // 4: search.v2.FieldValue.type:type_name -> search.v2.FieldValue.ContentType 58, // 5: search.v2.FieldValue.geo:type_name -> search.v2.FieldValue.Geo 17, // 6: search.v2.Field.value:type_name -> search.v2.FieldValue 2, // 7: search.v2.FieldTypes.type:type_name -> search.v2.FieldValue.ContentType 3, // 8: search.v2.FacetValue.type:type_name -> search.v2.FacetValue.ContentType 21, // 9: search.v2.Facet.value:type_name -> search.v2.FacetValue 18, // 10: search.v2.Document.field:type_name -> search.v2.Field 4, // 11: search.v2.Document.order_id_source:type_name -> search.v2.Document.OrderIdSource 5, // 12: search.v2.Document.storage:type_name -> search.v2.Document.Storage 22, // 13: search.v2.Document.facet:type_name -> search.v2.Facet 6, // 14: search.v2.RequestStatus.code:type_name -> search.v2.SearchServiceError.ErrorCode 7, // 15: search.v2.IndexSpec.consistency:type_name -> search.v2.IndexSpec.Consistency 8, // 16: search.v2.IndexSpec.source:type_name -> search.v2.IndexSpec.Source 9, // 17: search.v2.IndexSpec.mode:type_name -> search.v2.IndexSpec.Mode 27, // 18: search.v2.IndexMetadata.index_spec:type_name -> search.v2.IndexSpec 19, // 19: search.v2.IndexMetadata.field:type_name -> search.v2.FieldTypes 59, // 20: search.v2.IndexMetadata.storage:type_name -> search.v2.IndexMetadata.Storage 24, // 21: search.v2.IndexDocumentParams.document:type_name -> search.v2.Document 10, // 22: search.v2.IndexDocumentParams.freshness:type_name -> search.v2.IndexDocumentParams.Freshness 27, // 23: search.v2.IndexDocumentParams.index_spec:type_name -> search.v2.IndexSpec 29, // 24: search.v2.IndexDocumentRequest.params:type_name -> search.v2.IndexDocumentParams 26, // 25: search.v2.IndexDocumentResponse.status:type_name -> search.v2.RequestStatus 27, // 26: search.v2.DeleteDocumentParams.index_spec:type_name -> search.v2.IndexSpec 32, // 27: search.v2.DeleteDocumentRequest.params:type_name -> search.v2.DeleteDocumentParams 26, // 28: search.v2.DeleteDocumentResponse.status:type_name -> search.v2.RequestStatus 27, // 29: search.v2.ListDocumentsParams.index_spec:type_name -> search.v2.IndexSpec 35, // 30: search.v2.ListDocumentsRequest.params:type_name -> search.v2.ListDocumentsParams 26, // 31: search.v2.ListDocumentsResponse.status:type_name -> search.v2.RequestStatus 24, // 32: search.v2.ListDocumentsResponse.document:type_name -> search.v2.Document 8, // 33: search.v2.ListIndexesParams.source:type_name -> search.v2.IndexSpec.Source 38, // 34: search.v2.ListIndexesRequest.params:type_name -> search.v2.ListIndexesParams 26, // 35: search.v2.ListIndexesResponse.status:type_name -> search.v2.RequestStatus 28, // 36: search.v2.ListIndexesResponse.index_metadata:type_name -> search.v2.IndexMetadata 8, // 37: search.v2.DeleteSchemaParams.source:type_name -> search.v2.IndexSpec.Source 27, // 38: search.v2.DeleteSchemaParams.index_spec:type_name -> search.v2.IndexSpec 41, // 39: search.v2.DeleteSchemaRequest.params:type_name -> search.v2.DeleteSchemaParams 26, // 40: search.v2.DeleteSchemaResponse.status:type_name -> search.v2.RequestStatus 11, // 41: search.v2.ScorerSpec.scorer:type_name -> search.v2.ScorerSpec.Scorer 60, // 42: search.v2.FieldSpec.expression:type_name -> search.v2.FieldSpec.Expression 47, // 43: search.v2.FacetRequestParam.range:type_name -> search.v2.FacetRange 48, // 44: search.v2.FacetRequest.params:type_name -> search.v2.FacetRequestParam 61, // 45: search.v2.FacetRefinement.range:type_name -> search.v2.FacetRefinement.Range 27, // 46: search.v2.SearchParams.index_spec:type_name -> search.v2.IndexSpec 12, // 47: search.v2.SearchParams.cursor_type:type_name -> search.v2.SearchParams.CursorType 44, // 48: search.v2.SearchParams.sort_spec:type_name -> search.v2.SortSpec 45, // 49: search.v2.SearchParams.scorer_spec:type_name -> search.v2.ScorerSpec 46, // 50: search.v2.SearchParams.field_spec:type_name -> search.v2.FieldSpec 13, // 51: search.v2.SearchParams.parsing_mode:type_name -> search.v2.SearchParams.ParsingMode 50, // 52: search.v2.SearchParams.include_facet:type_name -> search.v2.FacetRequest 51, // 53: search.v2.SearchParams.facet_refinement:type_name -> search.v2.FacetRefinement 49, // 54: search.v2.SearchParams.facet_auto_detect_param:type_name -> search.v2.FacetAutoDetectParam 52, // 55: search.v2.SearchRequest.params:type_name -> search.v2.SearchParams 51, // 56: search.v2.FacetResultValue.refinement:type_name -> search.v2.FacetRefinement 54, // 57: search.v2.FacetResult.value:type_name -> search.v2.FacetResultValue 24, // 58: search.v2.SearchResult.document:type_name -> search.v2.Document 18, // 59: search.v2.SearchResult.expression:type_name -> search.v2.Field 56, // 60: search.v2.SearchResponse.result:type_name -> search.v2.SearchResult 26, // 61: search.v2.SearchResponse.status:type_name -> search.v2.RequestStatus 55, // 62: search.v2.SearchResponse.facet_result:type_name -> search.v2.FacetResult 63, // [63:63] is the sub-list for method output_type 63, // [63:63] is the sub-list for method input_type 63, // [63:63] is the sub-list for extension type_name 63, // [63:63] is the sub-list for extension extendee 0, // [0:63] is the sub-list for field type_name } func init() { file_search_proto_init() } func file_search_proto_init() { if File_search_proto != nil { return } if !protoimpl.UnsafeEnabled { file_search_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Scope); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Entry); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccessControlList); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Field); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldTypes); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexShardSettings); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Facet); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DocumentMetadata); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Document); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SearchServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RequestStatus); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexSpec); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexMetadata); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexDocumentParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexDocumentRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexDocumentResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteDocumentParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteDocumentRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteDocumentResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListDocumentsParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListDocumentsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListDocumentsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListIndexesParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListIndexesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListIndexesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSchemaParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSchemaRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSchemaResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SortSpec); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ScorerSpec); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldSpec); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetRange); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetRequestParam); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetAutoDetectParam); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetRefinement); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SearchParams); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SearchRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetResultValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SearchResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SearchResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_search_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldValue_Geo); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexMetadata_Storage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldSpec_Expression); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_search_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FacetRefinement_Range); 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_search_proto_rawDesc, NumEnums: 14, NumMessages: 48, NumExtensions: 0, NumServices: 0, }, GoTypes: file_search_proto_goTypes, DependencyIndexes: file_search_proto_depIdxs, EnumInfos: file_search_proto_enumTypes, MessageInfos: file_search_proto_msgTypes, }.Build() File_search_proto = out.File file_search_proto_rawDesc = nil file_search_proto_goTypes = nil file_search_proto_depIdxs = nil }
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/search/search.proto
// Copyright 2023 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. syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/search"; package search.v2; message Scope { enum Type { USER_BY_CANONICAL_ID = 1; USER_BY_EMAIL = 2; GROUP_BY_CANONICAL_ID = 3; GROUP_BY_EMAIL = 4; GROUP_BY_DOMAIN = 5; ALL_USERS = 6; ALL_AUTHENTICATED_USERS = 7; } optional Type type = 1; optional string value = 2; } message Entry { enum Permission { READ = 1; WRITE = 2; FULL_CONTROL = 3; } optional Scope scope = 1; optional Permission permission = 2; optional string display_name = 3; } message AccessControlList { optional string owner = 1; repeated Entry entries = 2; } message FieldValue { enum ContentType { TEXT = 0; HTML = 1; ATOM = 2; DATE = 3; NUMBER = 4; GEO = 5; } optional ContentType type = 1 [default = TEXT]; optional string language = 2 [default = "en"]; optional string string_value = 3; optional group Geo = 4 { required double lat = 5; required double lng = 6; } } message Field { required string name = 1; required FieldValue value = 2; } message FieldTypes { required string name = 1; repeated FieldValue.ContentType type = 2; } message IndexShardSettings { repeated int32 prev_num_shards = 1; required int32 num_shards = 2 [default=1]; repeated int32 prev_num_shards_search_false = 3; optional string local_replica = 4 [default = ""]; } message FacetValue { enum ContentType { ATOM = 2; NUMBER = 4; } optional ContentType type = 1 [default = ATOM]; optional string string_value = 3; } message Facet { required string name = 1; required FacetValue value = 2; } message DocumentMetadata { optional int64 version = 1; optional int64 committed_st_version = 2; } message Document { optional string id = 1; optional string language = 2 [default = "en"]; repeated Field field = 3; optional int32 order_id = 4; optional OrderIdSource order_id_source = 6 [default = SUPPLIED]; enum OrderIdSource { DEFAULTED = 0; SUPPLIED = 1; } enum Storage { DISK = 0; } optional Storage storage = 5 [default = DISK]; repeated Facet facet = 8; } message SearchServiceError { enum ErrorCode { OK = 0; INVALID_REQUEST = 1; TRANSIENT_ERROR = 2; INTERNAL_ERROR = 3; PERMISSION_DENIED = 4; TIMEOUT = 5; CONCURRENT_TRANSACTION = 6; } } message RequestStatus { required SearchServiceError.ErrorCode code = 1; optional string error_detail = 2; optional int32 canonical_code = 3; } message IndexSpec { required string name = 1; enum Consistency { GLOBAL = 0; PER_DOCUMENT = 1; } optional Consistency consistency = 2 [default = PER_DOCUMENT]; optional string namespace = 3; optional int32 version = 4; enum Source { SEARCH = 0; DATASTORE = 1; CLOUD_STORAGE = 2; } optional Source source = 5 [default = SEARCH]; enum Mode { PRIORITY = 0; BACKGROUND = 1; } optional Mode mode = 6 [default = PRIORITY]; } message IndexMetadata { required IndexSpec index_spec = 1; repeated FieldTypes field = 2; message Storage { optional int64 amount_used = 1; optional int64 limit = 2; } optional Storage storage = 3; } message IndexDocumentParams { repeated Document document = 1; enum Freshness { SYNCHRONOUSLY = 0; WHEN_CONVENIENT = 1; } optional Freshness freshness = 2 [default = SYNCHRONOUSLY, deprecated=true]; required IndexSpec index_spec = 3; } message IndexDocumentRequest { required IndexDocumentParams params = 1; optional bytes app_id = 3; } message IndexDocumentResponse { repeated RequestStatus status = 1; repeated string doc_id = 2; } message DeleteDocumentParams { repeated string doc_id = 1; required IndexSpec index_spec = 2; } message DeleteDocumentRequest { required DeleteDocumentParams params = 1; optional bytes app_id = 3; } message DeleteDocumentResponse { repeated RequestStatus status = 1; } message ListDocumentsParams { required IndexSpec index_spec = 1; optional string start_doc_id = 2; optional bool include_start_doc = 3 [default = true]; optional int32 limit = 4 [default = 100]; optional bool keys_only = 5; } message ListDocumentsRequest { required ListDocumentsParams params = 1; optional bytes app_id = 2; } message ListDocumentsResponse { required RequestStatus status = 1; repeated Document document = 2; } message ListIndexesParams { optional bool fetch_schema = 1; optional int32 limit = 2 [default = 20]; optional string namespace = 3; optional string start_index_name = 4; optional bool include_start_index = 5 [default = true]; optional string index_name_prefix = 6; optional int32 offset = 7; optional IndexSpec.Source source = 8 [default = SEARCH]; } message ListIndexesRequest { required ListIndexesParams params = 1; optional bytes app_id = 3; } message ListIndexesResponse { required RequestStatus status = 1; repeated IndexMetadata index_metadata = 2; } message DeleteSchemaParams { optional IndexSpec.Source source = 1 [default = SEARCH]; repeated IndexSpec index_spec = 2; } message DeleteSchemaRequest { required DeleteSchemaParams params = 1; optional bytes app_id = 3; } message DeleteSchemaResponse { repeated RequestStatus status = 1; } message SortSpec { required string sort_expression = 1; optional bool sort_descending = 2 [default = true]; optional string default_value_text = 4; optional double default_value_numeric = 5; } message ScorerSpec { enum Scorer { RESCORING_MATCH_SCORER = 0; MATCH_SCORER = 2; } optional Scorer scorer = 1 [default = MATCH_SCORER]; optional int32 limit = 2 [default = 1000]; optional string match_scorer_parameters = 9; } message FieldSpec { repeated string name = 1; repeated group Expression = 2 { required string name = 3; required string expression = 4; } } message FacetRange { optional string name = 1; optional string start = 2; optional string end = 3; } message FacetRequestParam { optional int32 value_limit = 1; repeated FacetRange range = 2; repeated string value_constraint = 3; } message FacetAutoDetectParam { optional int32 value_limit = 1 [default = 10]; } message FacetRequest { required string name = 1; optional FacetRequestParam params = 2; } message FacetRefinement { required string name = 1; optional string value = 2; message Range { optional string start = 1; optional string end = 2; } optional Range range = 3; } message SearchParams { required IndexSpec index_spec = 1; required string query = 2; optional string cursor = 4; optional int32 offset = 11; enum CursorType { NONE = 0; SINGLE = 1; PER_RESULT = 2; } optional CursorType cursor_type = 5 [default = NONE]; optional int32 limit = 6 [default = 20]; optional int32 matched_count_accuracy = 7; repeated SortSpec sort_spec = 8; optional ScorerSpec scorer_spec = 9; optional FieldSpec field_spec = 10; optional bool keys_only = 12; enum ParsingMode { STRICT = 0; RELAXED = 1; } optional ParsingMode parsing_mode = 13 [default = STRICT]; optional int32 auto_discover_facet_count = 15 [default = 0]; repeated FacetRequest include_facet = 16; repeated FacetRefinement facet_refinement = 17; optional FacetAutoDetectParam facet_auto_detect_param = 18; optional int32 facet_depth = 19 [default=1000]; } message SearchRequest { required SearchParams params = 1; optional bytes app_id = 3; } message FacetResultValue { required string name = 1; required int32 count = 2; required FacetRefinement refinement = 3; } message FacetResult { required string name = 1; repeated FacetResultValue value = 2; } message SearchResult { required Document document = 1; repeated Field expression = 4; repeated double score = 2; optional string cursor = 3; } message SearchResponse { repeated SearchResult result = 1; required int64 matched_count = 2; required RequestStatus status = 3; optional string cursor = 4; repeated FacetResult facet_result = 5; extensions 1000 to 9999; }
capability
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/capability/capability_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/capability"; package appengine.v2; message IsEnabledRequest { required string package = 1; repeated string capability = 2; repeated string call = 3; } message IsEnabledResponse { enum SummaryStatus { DEFAULT = 0; ENABLED = 1; SCHEDULED_FUTURE = 2; SCHEDULED_NOW = 3; DISABLED = 4; UNKNOWN = 5; } optional SummaryStatus summary_status = 1; optional int64 time_until_scheduled = 2; } service CapabilityService { rpc IsEnabled(IsEnabledRequest) returns (IsEnabledResponse) {}; }
capability
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/capability/capability_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: capability_service.proto package capability import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type IsEnabledResponse_SummaryStatus int32 const ( IsEnabledResponse_DEFAULT IsEnabledResponse_SummaryStatus = 0 IsEnabledResponse_ENABLED IsEnabledResponse_SummaryStatus = 1 IsEnabledResponse_SCHEDULED_FUTURE IsEnabledResponse_SummaryStatus = 2 IsEnabledResponse_SCHEDULED_NOW IsEnabledResponse_SummaryStatus = 3 IsEnabledResponse_DISABLED IsEnabledResponse_SummaryStatus = 4 IsEnabledResponse_UNKNOWN IsEnabledResponse_SummaryStatus = 5 ) // Enum value maps for IsEnabledResponse_SummaryStatus. var ( IsEnabledResponse_SummaryStatus_name = map[int32]string{ 0: "DEFAULT", 1: "ENABLED", 2: "SCHEDULED_FUTURE", 3: "SCHEDULED_NOW", 4: "DISABLED", 5: "UNKNOWN", } IsEnabledResponse_SummaryStatus_value = map[string]int32{ "DEFAULT": 0, "ENABLED": 1, "SCHEDULED_FUTURE": 2, "SCHEDULED_NOW": 3, "DISABLED": 4, "UNKNOWN": 5, } ) func (x IsEnabledResponse_SummaryStatus) Enum() *IsEnabledResponse_SummaryStatus { p := new(IsEnabledResponse_SummaryStatus) *p = x return p } func (x IsEnabledResponse_SummaryStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (IsEnabledResponse_SummaryStatus) Descriptor() protoreflect.EnumDescriptor { return file_capability_service_proto_enumTypes[0].Descriptor() } func (IsEnabledResponse_SummaryStatus) Type() protoreflect.EnumType { return &file_capability_service_proto_enumTypes[0] } func (x IsEnabledResponse_SummaryStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *IsEnabledResponse_SummaryStatus) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = IsEnabledResponse_SummaryStatus(num) return nil } // Deprecated: Use IsEnabledResponse_SummaryStatus.Descriptor instead. func (IsEnabledResponse_SummaryStatus) EnumDescriptor() ([]byte, []int) { return file_capability_service_proto_rawDescGZIP(), []int{1, 0} } type IsEnabledRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Package *string `protobuf:"bytes,1,req,name=package" json:"package,omitempty"` Capability []string `protobuf:"bytes,2,rep,name=capability" json:"capability,omitempty"` Call []string `protobuf:"bytes,3,rep,name=call" json:"call,omitempty"` } func (x *IsEnabledRequest) Reset() { *x = IsEnabledRequest{} if protoimpl.UnsafeEnabled { mi := &file_capability_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IsEnabledRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*IsEnabledRequest) ProtoMessage() {} func (x *IsEnabledRequest) ProtoReflect() protoreflect.Message { mi := &file_capability_service_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 IsEnabledRequest.ProtoReflect.Descriptor instead. func (*IsEnabledRequest) Descriptor() ([]byte, []int) { return file_capability_service_proto_rawDescGZIP(), []int{0} } func (x *IsEnabledRequest) GetPackage() string { if x != nil && x.Package != nil { return *x.Package } return "" } func (x *IsEnabledRequest) GetCapability() []string { if x != nil { return x.Capability } return nil } func (x *IsEnabledRequest) GetCall() []string { if x != nil { return x.Call } return nil } type IsEnabledResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SummaryStatus *IsEnabledResponse_SummaryStatus `protobuf:"varint,1,opt,name=summary_status,json=summaryStatus,enum=appengine.v2.IsEnabledResponse_SummaryStatus" json:"summary_status,omitempty"` TimeUntilScheduled *int64 `protobuf:"varint,2,opt,name=time_until_scheduled,json=timeUntilScheduled" json:"time_until_scheduled,omitempty"` } func (x *IsEnabledResponse) Reset() { *x = IsEnabledResponse{} if protoimpl.UnsafeEnabled { mi := &file_capability_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IsEnabledResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*IsEnabledResponse) ProtoMessage() {} func (x *IsEnabledResponse) ProtoReflect() protoreflect.Message { mi := &file_capability_service_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 IsEnabledResponse.ProtoReflect.Descriptor instead. func (*IsEnabledResponse) Descriptor() ([]byte, []int) { return file_capability_service_proto_rawDescGZIP(), []int{1} } func (x *IsEnabledResponse) GetSummaryStatus() IsEnabledResponse_SummaryStatus { if x != nil && x.SummaryStatus != nil { return *x.SummaryStatus } return IsEnabledResponse_DEFAULT } func (x *IsEnabledResponse) GetTimeUntilScheduled() int64 { if x != nil && x.TimeUntilScheduled != nil { return *x.TimeUntilScheduled } return 0 } var File_capability_service_proto protoreflect.FileDescriptor var file_capability_service_proto_rawDesc = []byte{ 0x0a, 0x18, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0x60, 0x0a, 0x10, 0x49, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x22, 0x8a, 0x02, 0x0a, 0x11, 0x49, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0e, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x22, 0x6d, 0x0a, 0x0d, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x5f, 0x46, 0x55, 0x54, 0x55, 0x52, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x57, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x05, 0x32, 0x63, 0x0a, 0x11, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x49, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, } var ( file_capability_service_proto_rawDescOnce sync.Once file_capability_service_proto_rawDescData = file_capability_service_proto_rawDesc ) func file_capability_service_proto_rawDescGZIP() []byte { file_capability_service_proto_rawDescOnce.Do(func() { file_capability_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_capability_service_proto_rawDescData) }) return file_capability_service_proto_rawDescData } var file_capability_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_capability_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_capability_service_proto_goTypes = []interface{}{ (IsEnabledResponse_SummaryStatus)(0), // 0: appengine.v2.IsEnabledResponse.SummaryStatus (*IsEnabledRequest)(nil), // 1: appengine.v2.IsEnabledRequest (*IsEnabledResponse)(nil), // 2: appengine.v2.IsEnabledResponse } var file_capability_service_proto_depIdxs = []int32{ 0, // 0: appengine.v2.IsEnabledResponse.summary_status:type_name -> appengine.v2.IsEnabledResponse.SummaryStatus 1, // 1: appengine.v2.CapabilityService.IsEnabled:input_type -> appengine.v2.IsEnabledRequest 2, // 2: appengine.v2.CapabilityService.IsEnabled:output_type -> appengine.v2.IsEnabledResponse 2, // [2:3] is the sub-list for method output_type 1, // [1:2] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_capability_service_proto_init() } func file_capability_service_proto_init() { if File_capability_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_capability_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsEnabledRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_capability_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsEnabledResponse); 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_capability_service_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, GoTypes: file_capability_service_proto_goTypes, DependencyIndexes: file_capability_service_proto_depIdxs, EnumInfos: file_capability_service_proto_enumTypes, MessageInfos: file_capability_service_proto_msgTypes, }.Build() File_capability_service_proto = out.File file_capability_service_proto_rawDesc = nil file_capability_service_proto_goTypes = nil file_capability_service_proto_depIdxs = nil }
user
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/user/user_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: user_service.proto package user import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type UserServiceError_ErrorCode int32 const ( UserServiceError_OK UserServiceError_ErrorCode = 0 UserServiceError_REDIRECT_URL_TOO_LONG UserServiceError_ErrorCode = 1 UserServiceError_NOT_ALLOWED UserServiceError_ErrorCode = 2 UserServiceError_OAUTH_INVALID_TOKEN UserServiceError_ErrorCode = 3 UserServiceError_OAUTH_INVALID_REQUEST UserServiceError_ErrorCode = 4 UserServiceError_OAUTH_ERROR UserServiceError_ErrorCode = 5 ) // Enum value maps for UserServiceError_ErrorCode. var ( UserServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "REDIRECT_URL_TOO_LONG", 2: "NOT_ALLOWED", 3: "OAUTH_INVALID_TOKEN", 4: "OAUTH_INVALID_REQUEST", 5: "OAUTH_ERROR", } UserServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "REDIRECT_URL_TOO_LONG": 1, "NOT_ALLOWED": 2, "OAUTH_INVALID_TOKEN": 3, "OAUTH_INVALID_REQUEST": 4, "OAUTH_ERROR": 5, } ) func (x UserServiceError_ErrorCode) Enum() *UserServiceError_ErrorCode { p := new(UserServiceError_ErrorCode) *p = x return p } func (x UserServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (UserServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_user_service_proto_enumTypes[0].Descriptor() } func (UserServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_user_service_proto_enumTypes[0] } func (x UserServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *UserServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = UserServiceError_ErrorCode(num) return nil } // Deprecated: Use UserServiceError_ErrorCode.Descriptor instead. func (UserServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{0, 0} } type UserServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *UserServiceError) Reset() { *x = UserServiceError{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UserServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*UserServiceError) ProtoMessage() {} func (x *UserServiceError) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 UserServiceError.ProtoReflect.Descriptor instead. func (*UserServiceError) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{0} } type CreateLoginURLRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DestinationUrl *string `protobuf:"bytes,1,req,name=destination_url,json=destinationUrl" json:"destination_url,omitempty"` AuthDomain *string `protobuf:"bytes,2,opt,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` FederatedIdentity *string `protobuf:"bytes,3,opt,name=federated_identity,json=federatedIdentity,def=" json:"federated_identity,omitempty"` } // Default values for CreateLoginURLRequest fields. const ( Default_CreateLoginURLRequest_FederatedIdentity = string("") ) func (x *CreateLoginURLRequest) Reset() { *x = CreateLoginURLRequest{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateLoginURLRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateLoginURLRequest) ProtoMessage() {} func (x *CreateLoginURLRequest) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 CreateLoginURLRequest.ProtoReflect.Descriptor instead. func (*CreateLoginURLRequest) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{1} } func (x *CreateLoginURLRequest) GetDestinationUrl() string { if x != nil && x.DestinationUrl != nil { return *x.DestinationUrl } return "" } func (x *CreateLoginURLRequest) GetAuthDomain() string { if x != nil && x.AuthDomain != nil { return *x.AuthDomain } return "" } func (x *CreateLoginURLRequest) GetFederatedIdentity() string { if x != nil && x.FederatedIdentity != nil { return *x.FederatedIdentity } return Default_CreateLoginURLRequest_FederatedIdentity } type CreateLoginURLResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields LoginUrl *string `protobuf:"bytes,1,req,name=login_url,json=loginUrl" json:"login_url,omitempty"` } func (x *CreateLoginURLResponse) Reset() { *x = CreateLoginURLResponse{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateLoginURLResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateLoginURLResponse) ProtoMessage() {} func (x *CreateLoginURLResponse) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 CreateLoginURLResponse.ProtoReflect.Descriptor instead. func (*CreateLoginURLResponse) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{2} } func (x *CreateLoginURLResponse) GetLoginUrl() string { if x != nil && x.LoginUrl != nil { return *x.LoginUrl } return "" } type CreateLogoutURLRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DestinationUrl *string `protobuf:"bytes,1,req,name=destination_url,json=destinationUrl" json:"destination_url,omitempty"` AuthDomain *string `protobuf:"bytes,2,opt,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` } func (x *CreateLogoutURLRequest) Reset() { *x = CreateLogoutURLRequest{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateLogoutURLRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateLogoutURLRequest) ProtoMessage() {} func (x *CreateLogoutURLRequest) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 CreateLogoutURLRequest.ProtoReflect.Descriptor instead. func (*CreateLogoutURLRequest) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{3} } func (x *CreateLogoutURLRequest) GetDestinationUrl() string { if x != nil && x.DestinationUrl != nil { return *x.DestinationUrl } return "" } func (x *CreateLogoutURLRequest) GetAuthDomain() string { if x != nil && x.AuthDomain != nil { return *x.AuthDomain } return "" } type CreateLogoutURLResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields LogoutUrl *string `protobuf:"bytes,1,req,name=logout_url,json=logoutUrl" json:"logout_url,omitempty"` } func (x *CreateLogoutURLResponse) Reset() { *x = CreateLogoutURLResponse{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateLogoutURLResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateLogoutURLResponse) ProtoMessage() {} func (x *CreateLogoutURLResponse) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 CreateLogoutURLResponse.ProtoReflect.Descriptor instead. func (*CreateLogoutURLResponse) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{4} } func (x *CreateLogoutURLResponse) GetLogoutUrl() string { if x != nil && x.LogoutUrl != nil { return *x.LogoutUrl } return "" } type GetOAuthUserRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Scope *string `protobuf:"bytes,1,opt,name=scope" json:"scope,omitempty"` Scopes []string `protobuf:"bytes,2,rep,name=scopes" json:"scopes,omitempty"` } func (x *GetOAuthUserRequest) Reset() { *x = GetOAuthUserRequest{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetOAuthUserRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetOAuthUserRequest) ProtoMessage() {} func (x *GetOAuthUserRequest) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 GetOAuthUserRequest.ProtoReflect.Descriptor instead. func (*GetOAuthUserRequest) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{5} } func (x *GetOAuthUserRequest) GetScope() string { if x != nil && x.Scope != nil { return *x.Scope } return "" } func (x *GetOAuthUserRequest) GetScopes() []string { if x != nil { return x.Scopes } return nil } type GetOAuthUserResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"` UserId *string `protobuf:"bytes,2,req,name=user_id,json=userId" json:"user_id,omitempty"` AuthDomain *string `protobuf:"bytes,3,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` UserOrganization *string `protobuf:"bytes,4,opt,name=user_organization,json=userOrganization,def=" json:"user_organization,omitempty"` IsAdmin *bool `protobuf:"varint,5,opt,name=is_admin,json=isAdmin,def=0" json:"is_admin,omitempty"` ClientId *string `protobuf:"bytes,6,opt,name=client_id,json=clientId,def=" json:"client_id,omitempty"` Scopes []string `protobuf:"bytes,7,rep,name=scopes" json:"scopes,omitempty"` } // Default values for GetOAuthUserResponse fields. const ( Default_GetOAuthUserResponse_UserOrganization = string("") Default_GetOAuthUserResponse_IsAdmin = bool(false) Default_GetOAuthUserResponse_ClientId = string("") ) func (x *GetOAuthUserResponse) Reset() { *x = GetOAuthUserResponse{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetOAuthUserResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetOAuthUserResponse) ProtoMessage() {} func (x *GetOAuthUserResponse) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 GetOAuthUserResponse.ProtoReflect.Descriptor instead. func (*GetOAuthUserResponse) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{6} } func (x *GetOAuthUserResponse) GetEmail() string { if x != nil && x.Email != nil { return *x.Email } return "" } func (x *GetOAuthUserResponse) GetUserId() string { if x != nil && x.UserId != nil { return *x.UserId } return "" } func (x *GetOAuthUserResponse) GetAuthDomain() string { if x != nil && x.AuthDomain != nil { return *x.AuthDomain } return "" } func (x *GetOAuthUserResponse) GetUserOrganization() string { if x != nil && x.UserOrganization != nil { return *x.UserOrganization } return Default_GetOAuthUserResponse_UserOrganization } func (x *GetOAuthUserResponse) GetIsAdmin() bool { if x != nil && x.IsAdmin != nil { return *x.IsAdmin } return Default_GetOAuthUserResponse_IsAdmin } func (x *GetOAuthUserResponse) GetClientId() string { if x != nil && x.ClientId != nil { return *x.ClientId } return Default_GetOAuthUserResponse_ClientId } func (x *GetOAuthUserResponse) GetScopes() []string { if x != nil { return x.Scopes } return nil } type CheckOAuthSignatureRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *CheckOAuthSignatureRequest) Reset() { *x = CheckOAuthSignatureRequest{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CheckOAuthSignatureRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CheckOAuthSignatureRequest) ProtoMessage() {} func (x *CheckOAuthSignatureRequest) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 CheckOAuthSignatureRequest.ProtoReflect.Descriptor instead. func (*CheckOAuthSignatureRequest) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{7} } type CheckOAuthSignatureResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields OauthConsumerKey *string `protobuf:"bytes,1,req,name=oauth_consumer_key,json=oauthConsumerKey" json:"oauth_consumer_key,omitempty"` } func (x *CheckOAuthSignatureResponse) Reset() { *x = CheckOAuthSignatureResponse{} if protoimpl.UnsafeEnabled { mi := &file_user_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CheckOAuthSignatureResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CheckOAuthSignatureResponse) ProtoMessage() {} func (x *CheckOAuthSignatureResponse) ProtoReflect() protoreflect.Message { mi := &file_user_service_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 CheckOAuthSignatureResponse.ProtoReflect.Descriptor instead. func (*CheckOAuthSignatureResponse) Descriptor() ([]byte, []int) { return file_user_service_proto_rawDescGZIP(), []int{8} } func (x *CheckOAuthSignatureResponse) GetOauthConsumerKey() string { if x != nil && x.OauthConsumerKey != nil { return *x.OauthConsumerKey } return "" } var File_user_service_proto protoreflect.FileDescriptor var file_user_service_proto_rawDesc = []byte{ 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x22, 0x99, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x55, 0x52, 0x4c, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x2f, 0x0a, 0x12, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x11, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x35, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x62, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x38, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x55, 0x72, 0x6c, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x07, 0x69, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x00, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x1b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, } var ( file_user_service_proto_rawDescOnce sync.Once file_user_service_proto_rawDescData = file_user_service_proto_rawDesc ) func file_user_service_proto_rawDescGZIP() []byte { file_user_service_proto_rawDescOnce.Do(func() { file_user_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_service_proto_rawDescData) }) return file_user_service_proto_rawDescData } var file_user_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_user_service_proto_goTypes = []interface{}{ (UserServiceError_ErrorCode)(0), // 0: appengine.v2.UserServiceError.ErrorCode (*UserServiceError)(nil), // 1: appengine.v2.UserServiceError (*CreateLoginURLRequest)(nil), // 2: appengine.v2.CreateLoginURLRequest (*CreateLoginURLResponse)(nil), // 3: appengine.v2.CreateLoginURLResponse (*CreateLogoutURLRequest)(nil), // 4: appengine.v2.CreateLogoutURLRequest (*CreateLogoutURLResponse)(nil), // 5: appengine.v2.CreateLogoutURLResponse (*GetOAuthUserRequest)(nil), // 6: appengine.v2.GetOAuthUserRequest (*GetOAuthUserResponse)(nil), // 7: appengine.v2.GetOAuthUserResponse (*CheckOAuthSignatureRequest)(nil), // 8: appengine.v2.CheckOAuthSignatureRequest (*CheckOAuthSignatureResponse)(nil), // 9: appengine.v2.CheckOAuthSignatureResponse } var file_user_service_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_user_service_proto_init() } func file_user_service_proto_init() { if File_user_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_user_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateLoginURLRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateLoginURLResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateLogoutURLRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateLogoutURLResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetOAuthUserRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetOAuthUserResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckOAuthSignatureRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_user_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckOAuthSignatureResponse); 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_user_service_proto_rawDesc, NumEnums: 1, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, GoTypes: file_user_service_proto_goTypes, DependencyIndexes: file_user_service_proto_depIdxs, EnumInfos: file_user_service_proto_enumTypes, MessageInfos: file_user_service_proto_msgTypes, }.Build() File_user_service_proto = out.File file_user_service_proto_rawDesc = nil file_user_service_proto_goTypes = nil file_user_service_proto_depIdxs = nil }
user
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/user/user_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/user"; package appengine.v2; message UserServiceError { enum ErrorCode { OK = 0; REDIRECT_URL_TOO_LONG = 1; NOT_ALLOWED = 2; OAUTH_INVALID_TOKEN = 3; OAUTH_INVALID_REQUEST = 4; OAUTH_ERROR = 5; } } message CreateLoginURLRequest { required string destination_url = 1; optional string auth_domain = 2; optional string federated_identity = 3 [default = ""]; } message CreateLoginURLResponse { required string login_url = 1; } message CreateLogoutURLRequest { required string destination_url = 1; optional string auth_domain = 2; } message CreateLogoutURLResponse { required string logout_url = 1; } message GetOAuthUserRequest { optional string scope = 1; repeated string scopes = 2; } message GetOAuthUserResponse { required string email = 1; required string user_id = 2; required string auth_domain = 3; optional string user_organization = 4 [default = ""]; optional bool is_admin = 5 [default = false]; optional string client_id = 6 [default = ""]; repeated string scopes = 7; } message CheckOAuthSignatureRequest { } message CheckOAuthSignatureResponse { required string oauth_consumer_key = 1; }
taskqueue
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/taskqueue/taskqueue_service.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0-devel // protoc v3.21.12 // source: internal/taskqueue/taskqueue_service.proto package taskqueue import ( datastore "google.golang.org/appengine/v2/internal/datastore" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type TaskQueueServiceError_ErrorCode int32 const ( TaskQueueServiceError_OK TaskQueueServiceError_ErrorCode = 0 TaskQueueServiceError_UNKNOWN_QUEUE TaskQueueServiceError_ErrorCode = 1 TaskQueueServiceError_TRANSIENT_ERROR TaskQueueServiceError_ErrorCode = 2 TaskQueueServiceError_INTERNAL_ERROR TaskQueueServiceError_ErrorCode = 3 TaskQueueServiceError_TASK_TOO_LARGE TaskQueueServiceError_ErrorCode = 4 TaskQueueServiceError_INVALID_TASK_NAME TaskQueueServiceError_ErrorCode = 5 TaskQueueServiceError_INVALID_QUEUE_NAME TaskQueueServiceError_ErrorCode = 6 TaskQueueServiceError_INVALID_URL TaskQueueServiceError_ErrorCode = 7 TaskQueueServiceError_INVALID_QUEUE_RATE TaskQueueServiceError_ErrorCode = 8 TaskQueueServiceError_PERMISSION_DENIED TaskQueueServiceError_ErrorCode = 9 TaskQueueServiceError_TASK_ALREADY_EXISTS TaskQueueServiceError_ErrorCode = 10 TaskQueueServiceError_TOMBSTONED_TASK TaskQueueServiceError_ErrorCode = 11 TaskQueueServiceError_INVALID_ETA TaskQueueServiceError_ErrorCode = 12 TaskQueueServiceError_INVALID_REQUEST TaskQueueServiceError_ErrorCode = 13 TaskQueueServiceError_UNKNOWN_TASK TaskQueueServiceError_ErrorCode = 14 TaskQueueServiceError_TOMBSTONED_QUEUE TaskQueueServiceError_ErrorCode = 15 TaskQueueServiceError_DUPLICATE_TASK_NAME TaskQueueServiceError_ErrorCode = 16 TaskQueueServiceError_SKIPPED TaskQueueServiceError_ErrorCode = 17 TaskQueueServiceError_TOO_MANY_TASKS TaskQueueServiceError_ErrorCode = 18 TaskQueueServiceError_INVALID_PAYLOAD TaskQueueServiceError_ErrorCode = 19 TaskQueueServiceError_INVALID_RETRY_PARAMETERS TaskQueueServiceError_ErrorCode = 20 TaskQueueServiceError_INVALID_QUEUE_MODE TaskQueueServiceError_ErrorCode = 21 TaskQueueServiceError_ACL_LOOKUP_ERROR TaskQueueServiceError_ErrorCode = 22 TaskQueueServiceError_TRANSACTIONAL_REQUEST_TOO_LARGE TaskQueueServiceError_ErrorCode = 23 TaskQueueServiceError_INCORRECT_CREATOR_NAME TaskQueueServiceError_ErrorCode = 24 TaskQueueServiceError_TASK_LEASE_EXPIRED TaskQueueServiceError_ErrorCode = 25 TaskQueueServiceError_QUEUE_PAUSED TaskQueueServiceError_ErrorCode = 26 TaskQueueServiceError_INVALID_TAG TaskQueueServiceError_ErrorCode = 27 // Reserved range for the Datastore error codes. // Original Datastore error code is shifted by DATASTORE_ERROR offset. TaskQueueServiceError_DATASTORE_ERROR TaskQueueServiceError_ErrorCode = 10000 ) // Enum value maps for TaskQueueServiceError_ErrorCode. var ( TaskQueueServiceError_ErrorCode_name = map[int32]string{ 0: "OK", 1: "UNKNOWN_QUEUE", 2: "TRANSIENT_ERROR", 3: "INTERNAL_ERROR", 4: "TASK_TOO_LARGE", 5: "INVALID_TASK_NAME", 6: "INVALID_QUEUE_NAME", 7: "INVALID_URL", 8: "INVALID_QUEUE_RATE", 9: "PERMISSION_DENIED", 10: "TASK_ALREADY_EXISTS", 11: "TOMBSTONED_TASK", 12: "INVALID_ETA", 13: "INVALID_REQUEST", 14: "UNKNOWN_TASK", 15: "TOMBSTONED_QUEUE", 16: "DUPLICATE_TASK_NAME", 17: "SKIPPED", 18: "TOO_MANY_TASKS", 19: "INVALID_PAYLOAD", 20: "INVALID_RETRY_PARAMETERS", 21: "INVALID_QUEUE_MODE", 22: "ACL_LOOKUP_ERROR", 23: "TRANSACTIONAL_REQUEST_TOO_LARGE", 24: "INCORRECT_CREATOR_NAME", 25: "TASK_LEASE_EXPIRED", 26: "QUEUE_PAUSED", 27: "INVALID_TAG", 10000: "DATASTORE_ERROR", } TaskQueueServiceError_ErrorCode_value = map[string]int32{ "OK": 0, "UNKNOWN_QUEUE": 1, "TRANSIENT_ERROR": 2, "INTERNAL_ERROR": 3, "TASK_TOO_LARGE": 4, "INVALID_TASK_NAME": 5, "INVALID_QUEUE_NAME": 6, "INVALID_URL": 7, "INVALID_QUEUE_RATE": 8, "PERMISSION_DENIED": 9, "TASK_ALREADY_EXISTS": 10, "TOMBSTONED_TASK": 11, "INVALID_ETA": 12, "INVALID_REQUEST": 13, "UNKNOWN_TASK": 14, "TOMBSTONED_QUEUE": 15, "DUPLICATE_TASK_NAME": 16, "SKIPPED": 17, "TOO_MANY_TASKS": 18, "INVALID_PAYLOAD": 19, "INVALID_RETRY_PARAMETERS": 20, "INVALID_QUEUE_MODE": 21, "ACL_LOOKUP_ERROR": 22, "TRANSACTIONAL_REQUEST_TOO_LARGE": 23, "INCORRECT_CREATOR_NAME": 24, "TASK_LEASE_EXPIRED": 25, "QUEUE_PAUSED": 26, "INVALID_TAG": 27, "DATASTORE_ERROR": 10000, } ) func (x TaskQueueServiceError_ErrorCode) Enum() *TaskQueueServiceError_ErrorCode { p := new(TaskQueueServiceError_ErrorCode) *p = x return p } func (x TaskQueueServiceError_ErrorCode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TaskQueueServiceError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_internal_taskqueue_taskqueue_service_proto_enumTypes[0].Descriptor() } func (TaskQueueServiceError_ErrorCode) Type() protoreflect.EnumType { return &file_internal_taskqueue_taskqueue_service_proto_enumTypes[0] } func (x TaskQueueServiceError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *TaskQueueServiceError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = TaskQueueServiceError_ErrorCode(num) return nil } // Deprecated: Use TaskQueueServiceError_ErrorCode.Descriptor instead. func (TaskQueueServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{0, 0} } type TaskQueueMode_Mode int32 const ( TaskQueueMode_PUSH TaskQueueMode_Mode = 0 TaskQueueMode_PULL TaskQueueMode_Mode = 1 ) // Enum value maps for TaskQueueMode_Mode. var ( TaskQueueMode_Mode_name = map[int32]string{ 0: "PUSH", 1: "PULL", } TaskQueueMode_Mode_value = map[string]int32{ "PUSH": 0, "PULL": 1, } ) func (x TaskQueueMode_Mode) Enum() *TaskQueueMode_Mode { p := new(TaskQueueMode_Mode) *p = x return p } func (x TaskQueueMode_Mode) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TaskQueueMode_Mode) Descriptor() protoreflect.EnumDescriptor { return file_internal_taskqueue_taskqueue_service_proto_enumTypes[1].Descriptor() } func (TaskQueueMode_Mode) Type() protoreflect.EnumType { return &file_internal_taskqueue_taskqueue_service_proto_enumTypes[1] } func (x TaskQueueMode_Mode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *TaskQueueMode_Mode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = TaskQueueMode_Mode(num) return nil } // Deprecated: Use TaskQueueMode_Mode.Descriptor instead. func (TaskQueueMode_Mode) EnumDescriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{5, 0} } type TaskQueueAddRequest_RequestMethod int32 const ( TaskQueueAddRequest_GET TaskQueueAddRequest_RequestMethod = 1 TaskQueueAddRequest_POST TaskQueueAddRequest_RequestMethod = 2 TaskQueueAddRequest_HEAD TaskQueueAddRequest_RequestMethod = 3 TaskQueueAddRequest_PUT TaskQueueAddRequest_RequestMethod = 4 TaskQueueAddRequest_DELETE TaskQueueAddRequest_RequestMethod = 5 ) // Enum value maps for TaskQueueAddRequest_RequestMethod. var ( TaskQueueAddRequest_RequestMethod_name = map[int32]string{ 1: "GET", 2: "POST", 3: "HEAD", 4: "PUT", 5: "DELETE", } TaskQueueAddRequest_RequestMethod_value = map[string]int32{ "GET": 1, "POST": 2, "HEAD": 3, "PUT": 4, "DELETE": 5, } ) func (x TaskQueueAddRequest_RequestMethod) Enum() *TaskQueueAddRequest_RequestMethod { p := new(TaskQueueAddRequest_RequestMethod) *p = x return p } func (x TaskQueueAddRequest_RequestMethod) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TaskQueueAddRequest_RequestMethod) Descriptor() protoreflect.EnumDescriptor { return file_internal_taskqueue_taskqueue_service_proto_enumTypes[2].Descriptor() } func (TaskQueueAddRequest_RequestMethod) Type() protoreflect.EnumType { return &file_internal_taskqueue_taskqueue_service_proto_enumTypes[2] } func (x TaskQueueAddRequest_RequestMethod) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *TaskQueueAddRequest_RequestMethod) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = TaskQueueAddRequest_RequestMethod(num) return nil } // Deprecated: Use TaskQueueAddRequest_RequestMethod.Descriptor instead. func (TaskQueueAddRequest_RequestMethod) EnumDescriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{6, 0} } type TaskQueueQueryTasksResponse_Task_RequestMethod int32 const ( TaskQueueQueryTasksResponse_Task_GET TaskQueueQueryTasksResponse_Task_RequestMethod = 1 TaskQueueQueryTasksResponse_Task_POST TaskQueueQueryTasksResponse_Task_RequestMethod = 2 TaskQueueQueryTasksResponse_Task_HEAD TaskQueueQueryTasksResponse_Task_RequestMethod = 3 TaskQueueQueryTasksResponse_Task_PUT TaskQueueQueryTasksResponse_Task_RequestMethod = 4 TaskQueueQueryTasksResponse_Task_DELETE TaskQueueQueryTasksResponse_Task_RequestMethod = 5 ) // Enum value maps for TaskQueueQueryTasksResponse_Task_RequestMethod. var ( TaskQueueQueryTasksResponse_Task_RequestMethod_name = map[int32]string{ 1: "GET", 2: "POST", 3: "HEAD", 4: "PUT", 5: "DELETE", } TaskQueueQueryTasksResponse_Task_RequestMethod_value = map[string]int32{ "GET": 1, "POST": 2, "HEAD": 3, "PUT": 4, "DELETE": 5, } ) func (x TaskQueueQueryTasksResponse_Task_RequestMethod) Enum() *TaskQueueQueryTasksResponse_Task_RequestMethod { p := new(TaskQueueQueryTasksResponse_Task_RequestMethod) *p = x return p } func (x TaskQueueQueryTasksResponse_Task_RequestMethod) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TaskQueueQueryTasksResponse_Task_RequestMethod) Descriptor() protoreflect.EnumDescriptor { return file_internal_taskqueue_taskqueue_service_proto_enumTypes[3].Descriptor() } func (TaskQueueQueryTasksResponse_Task_RequestMethod) Type() protoreflect.EnumType { return &file_internal_taskqueue_taskqueue_service_proto_enumTypes[3] } func (x TaskQueueQueryTasksResponse_Task_RequestMethod) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *TaskQueueQueryTasksResponse_Task_RequestMethod) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = TaskQueueQueryTasksResponse_Task_RequestMethod(num) return nil } // Deprecated: Use TaskQueueQueryTasksResponse_Task_RequestMethod.Descriptor instead. func (TaskQueueQueryTasksResponse_Task_RequestMethod) EnumDescriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{30, 0, 0} } type TaskQueueServiceError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TaskQueueServiceError) Reset() { *x = TaskQueueServiceError{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueServiceError) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueServiceError) ProtoMessage() {} func (x *TaskQueueServiceError) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueServiceError.ProtoReflect.Descriptor instead. func (*TaskQueueServiceError) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{0} } type TaskPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields } func (x *TaskPayload) Reset() { *x = TaskPayload{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskPayload) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskPayload) ProtoMessage() {} func (x *TaskPayload) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskPayload.ProtoReflect.Descriptor instead. func (*TaskPayload) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{1} } type TaskQueueRetryParameters struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RetryLimit *int32 `protobuf:"varint,1,opt,name=retry_limit,json=retryLimit" json:"retry_limit,omitempty"` AgeLimitSec *int64 `protobuf:"varint,2,opt,name=age_limit_sec,json=ageLimitSec" json:"age_limit_sec,omitempty"` MinBackoffSec *float64 `protobuf:"fixed64,3,opt,name=min_backoff_sec,json=minBackoffSec,def=0.1" json:"min_backoff_sec,omitempty"` MaxBackoffSec *float64 `protobuf:"fixed64,4,opt,name=max_backoff_sec,json=maxBackoffSec,def=3600" json:"max_backoff_sec,omitempty"` MaxDoublings *int32 `protobuf:"varint,5,opt,name=max_doublings,json=maxDoublings,def=16" json:"max_doublings,omitempty"` } // Default values for TaskQueueRetryParameters fields. const ( Default_TaskQueueRetryParameters_MinBackoffSec = float64(0.1) Default_TaskQueueRetryParameters_MaxBackoffSec = float64(3600) Default_TaskQueueRetryParameters_MaxDoublings = int32(16) ) func (x *TaskQueueRetryParameters) Reset() { *x = TaskQueueRetryParameters{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueRetryParameters) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueRetryParameters) ProtoMessage() {} func (x *TaskQueueRetryParameters) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueRetryParameters.ProtoReflect.Descriptor instead. func (*TaskQueueRetryParameters) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{2} } func (x *TaskQueueRetryParameters) GetRetryLimit() int32 { if x != nil && x.RetryLimit != nil { return *x.RetryLimit } return 0 } func (x *TaskQueueRetryParameters) GetAgeLimitSec() int64 { if x != nil && x.AgeLimitSec != nil { return *x.AgeLimitSec } return 0 } func (x *TaskQueueRetryParameters) GetMinBackoffSec() float64 { if x != nil && x.MinBackoffSec != nil { return *x.MinBackoffSec } return Default_TaskQueueRetryParameters_MinBackoffSec } func (x *TaskQueueRetryParameters) GetMaxBackoffSec() float64 { if x != nil && x.MaxBackoffSec != nil { return *x.MaxBackoffSec } return Default_TaskQueueRetryParameters_MaxBackoffSec } func (x *TaskQueueRetryParameters) GetMaxDoublings() int32 { if x != nil && x.MaxDoublings != nil { return *x.MaxDoublings } return Default_TaskQueueRetryParameters_MaxDoublings } type TaskQueueAcl struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields UserEmail [][]byte `protobuf:"bytes,1,rep,name=user_email,json=userEmail" json:"user_email,omitempty"` WriterEmail [][]byte `protobuf:"bytes,2,rep,name=writer_email,json=writerEmail" json:"writer_email,omitempty"` } func (x *TaskQueueAcl) Reset() { *x = TaskQueueAcl{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueAcl) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueAcl) ProtoMessage() {} func (x *TaskQueueAcl) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueAcl.ProtoReflect.Descriptor instead. func (*TaskQueueAcl) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{3} } func (x *TaskQueueAcl) GetUserEmail() [][]byte { if x != nil { return x.UserEmail } return nil } func (x *TaskQueueAcl) GetWriterEmail() [][]byte { if x != nil { return x.WriterEmail } return nil } type TaskQueueHttpHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key []byte `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` } func (x *TaskQueueHttpHeader) Reset() { *x = TaskQueueHttpHeader{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueHttpHeader) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueHttpHeader) ProtoMessage() {} func (x *TaskQueueHttpHeader) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueHttpHeader.ProtoReflect.Descriptor instead. func (*TaskQueueHttpHeader) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{4} } func (x *TaskQueueHttpHeader) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *TaskQueueHttpHeader) GetValue() []byte { if x != nil { return x.Value } return nil } type TaskQueueMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TaskQueueMode) Reset() { *x = TaskQueueMode{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueMode) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueMode) ProtoMessage() {} func (x *TaskQueueMode) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueMode.ProtoReflect.Descriptor instead. func (*TaskQueueMode) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{5} } type TaskQueueAddRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields QueueName []byte `protobuf:"bytes,1,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` TaskName []byte `protobuf:"bytes,2,req,name=task_name,json=taskName" json:"task_name,omitempty"` EtaUsec *int64 `protobuf:"varint,3,req,name=eta_usec,json=etaUsec" json:"eta_usec,omitempty"` Method *TaskQueueAddRequest_RequestMethod `protobuf:"varint,5,opt,name=method,enum=appengine.v2.TaskQueueAddRequest_RequestMethod,def=2" json:"method,omitempty"` Url []byte `protobuf:"bytes,4,opt,name=url" json:"url,omitempty"` Header []*TaskQueueAddRequest_Header `protobuf:"group,6,rep,name=Header,json=header" json:"header,omitempty"` Body []byte `protobuf:"bytes,9,opt,name=body" json:"body,omitempty"` Transaction *datastore.Transaction `protobuf:"bytes,10,opt,name=transaction" json:"transaction,omitempty"` AppId []byte `protobuf:"bytes,11,opt,name=app_id,json=appId" json:"app_id,omitempty"` Crontimetable *TaskQueueAddRequest_CronTimetable `protobuf:"group,12,opt,name=CronTimetable,json=crontimetable" json:"crontimetable,omitempty"` Description []byte `protobuf:"bytes,15,opt,name=description" json:"description,omitempty"` Payload *TaskPayload `protobuf:"bytes,16,opt,name=payload" json:"payload,omitempty"` RetryParameters *TaskQueueRetryParameters `protobuf:"bytes,17,opt,name=retry_parameters,json=retryParameters" json:"retry_parameters,omitempty"` Mode *TaskQueueMode_Mode `protobuf:"varint,18,opt,name=mode,enum=appengine.v2.TaskQueueMode_Mode,def=0" json:"mode,omitempty"` Tag []byte `protobuf:"bytes,19,opt,name=tag" json:"tag,omitempty"` } // Default values for TaskQueueAddRequest fields. const ( Default_TaskQueueAddRequest_Method = TaskQueueAddRequest_POST Default_TaskQueueAddRequest_Mode = TaskQueueMode_PUSH ) func (x *TaskQueueAddRequest) Reset() { *x = TaskQueueAddRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueAddRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueAddRequest) ProtoMessage() {} func (x *TaskQueueAddRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueAddRequest.ProtoReflect.Descriptor instead. func (*TaskQueueAddRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{6} } func (x *TaskQueueAddRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueAddRequest) GetTaskName() []byte { if x != nil { return x.TaskName } return nil } func (x *TaskQueueAddRequest) GetEtaUsec() int64 { if x != nil && x.EtaUsec != nil { return *x.EtaUsec } return 0 } func (x *TaskQueueAddRequest) GetMethod() TaskQueueAddRequest_RequestMethod { if x != nil && x.Method != nil { return *x.Method } return Default_TaskQueueAddRequest_Method } func (x *TaskQueueAddRequest) GetUrl() []byte { if x != nil { return x.Url } return nil } func (x *TaskQueueAddRequest) GetHeader() []*TaskQueueAddRequest_Header { if x != nil { return x.Header } return nil } func (x *TaskQueueAddRequest) GetBody() []byte { if x != nil { return x.Body } return nil } func (x *TaskQueueAddRequest) GetTransaction() *datastore.Transaction { if x != nil { return x.Transaction } return nil } func (x *TaskQueueAddRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueAddRequest) GetCrontimetable() *TaskQueueAddRequest_CronTimetable { if x != nil { return x.Crontimetable } return nil } func (x *TaskQueueAddRequest) GetDescription() []byte { if x != nil { return x.Description } return nil } func (x *TaskQueueAddRequest) GetPayload() *TaskPayload { if x != nil { return x.Payload } return nil } func (x *TaskQueueAddRequest) GetRetryParameters() *TaskQueueRetryParameters { if x != nil { return x.RetryParameters } return nil } func (x *TaskQueueAddRequest) GetMode() TaskQueueMode_Mode { if x != nil && x.Mode != nil { return *x.Mode } return Default_TaskQueueAddRequest_Mode } func (x *TaskQueueAddRequest) GetTag() []byte { if x != nil { return x.Tag } return nil } type TaskQueueAddResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ChosenTaskName []byte `protobuf:"bytes,1,opt,name=chosen_task_name,json=chosenTaskName" json:"chosen_task_name,omitempty"` } func (x *TaskQueueAddResponse) Reset() { *x = TaskQueueAddResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueAddResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueAddResponse) ProtoMessage() {} func (x *TaskQueueAddResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueAddResponse.ProtoReflect.Descriptor instead. func (*TaskQueueAddResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{7} } func (x *TaskQueueAddResponse) GetChosenTaskName() []byte { if x != nil { return x.ChosenTaskName } return nil } type TaskQueueBulkAddRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AddRequest []*TaskQueueAddRequest `protobuf:"bytes,1,rep,name=add_request,json=addRequest" json:"add_request,omitempty"` } func (x *TaskQueueBulkAddRequest) Reset() { *x = TaskQueueBulkAddRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueBulkAddRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueBulkAddRequest) ProtoMessage() {} func (x *TaskQueueBulkAddRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueBulkAddRequest.ProtoReflect.Descriptor instead. func (*TaskQueueBulkAddRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{8} } func (x *TaskQueueBulkAddRequest) GetAddRequest() []*TaskQueueAddRequest { if x != nil { return x.AddRequest } return nil } type TaskQueueBulkAddResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Taskresult []*TaskQueueBulkAddResponse_TaskResult `protobuf:"group,1,rep,name=TaskResult,json=taskresult" json:"taskresult,omitempty"` } func (x *TaskQueueBulkAddResponse) Reset() { *x = TaskQueueBulkAddResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueBulkAddResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueBulkAddResponse) ProtoMessage() {} func (x *TaskQueueBulkAddResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueBulkAddResponse.ProtoReflect.Descriptor instead. func (*TaskQueueBulkAddResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{9} } func (x *TaskQueueBulkAddResponse) GetTaskresult() []*TaskQueueBulkAddResponse_TaskResult { if x != nil { return x.Taskresult } return nil } type TaskQueueDeleteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields QueueName []byte `protobuf:"bytes,1,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` TaskName [][]byte `protobuf:"bytes,2,rep,name=task_name,json=taskName" json:"task_name,omitempty"` AppId []byte `protobuf:"bytes,3,opt,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *TaskQueueDeleteRequest) Reset() { *x = TaskQueueDeleteRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueDeleteRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueDeleteRequest) ProtoMessage() {} func (x *TaskQueueDeleteRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueDeleteRequest.ProtoReflect.Descriptor instead. func (*TaskQueueDeleteRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{10} } func (x *TaskQueueDeleteRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueDeleteRequest) GetTaskName() [][]byte { if x != nil { return x.TaskName } return nil } func (x *TaskQueueDeleteRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type TaskQueueDeleteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result []TaskQueueServiceError_ErrorCode `protobuf:"varint,3,rep,name=result,enum=appengine.v2.TaskQueueServiceError_ErrorCode" json:"result,omitempty"` } func (x *TaskQueueDeleteResponse) Reset() { *x = TaskQueueDeleteResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueDeleteResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueDeleteResponse) ProtoMessage() {} func (x *TaskQueueDeleteResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueDeleteResponse.ProtoReflect.Descriptor instead. func (*TaskQueueDeleteResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{11} } func (x *TaskQueueDeleteResponse) GetResult() []TaskQueueServiceError_ErrorCode { if x != nil { return x.Result } return nil } type TaskQueueForceRunRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,opt,name=app_id,json=appId" json:"app_id,omitempty"` QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` TaskName []byte `protobuf:"bytes,3,req,name=task_name,json=taskName" json:"task_name,omitempty"` } func (x *TaskQueueForceRunRequest) Reset() { *x = TaskQueueForceRunRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueForceRunRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueForceRunRequest) ProtoMessage() {} func (x *TaskQueueForceRunRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueForceRunRequest.ProtoReflect.Descriptor instead. func (*TaskQueueForceRunRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{12} } func (x *TaskQueueForceRunRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueForceRunRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueForceRunRequest) GetTaskName() []byte { if x != nil { return x.TaskName } return nil } type TaskQueueForceRunResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result *TaskQueueServiceError_ErrorCode `protobuf:"varint,3,req,name=result,enum=appengine.v2.TaskQueueServiceError_ErrorCode" json:"result,omitempty"` } func (x *TaskQueueForceRunResponse) Reset() { *x = TaskQueueForceRunResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueForceRunResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueForceRunResponse) ProtoMessage() {} func (x *TaskQueueForceRunResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueForceRunResponse.ProtoReflect.Descriptor instead. func (*TaskQueueForceRunResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{13} } func (x *TaskQueueForceRunResponse) GetResult() TaskQueueServiceError_ErrorCode { if x != nil && x.Result != nil { return *x.Result } return TaskQueueServiceError_OK } type TaskQueueUpdateQueueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,opt,name=app_id,json=appId" json:"app_id,omitempty"` QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` BucketRefillPerSecond *float64 `protobuf:"fixed64,3,req,name=bucket_refill_per_second,json=bucketRefillPerSecond" json:"bucket_refill_per_second,omitempty"` BucketCapacity *int32 `protobuf:"varint,4,req,name=bucket_capacity,json=bucketCapacity" json:"bucket_capacity,omitempty"` UserSpecifiedRate *string `protobuf:"bytes,5,opt,name=user_specified_rate,json=userSpecifiedRate" json:"user_specified_rate,omitempty"` RetryParameters *TaskQueueRetryParameters `protobuf:"bytes,6,opt,name=retry_parameters,json=retryParameters" json:"retry_parameters,omitempty"` MaxConcurrentRequests *int32 `protobuf:"varint,7,opt,name=max_concurrent_requests,json=maxConcurrentRequests" json:"max_concurrent_requests,omitempty"` Mode *TaskQueueMode_Mode `protobuf:"varint,8,opt,name=mode,enum=appengine.v2.TaskQueueMode_Mode,def=0" json:"mode,omitempty"` Acl *TaskQueueAcl `protobuf:"bytes,9,opt,name=acl" json:"acl,omitempty"` HeaderOverride []*TaskQueueHttpHeader `protobuf:"bytes,10,rep,name=header_override,json=headerOverride" json:"header_override,omitempty"` } // Default values for TaskQueueUpdateQueueRequest fields. const ( Default_TaskQueueUpdateQueueRequest_Mode = TaskQueueMode_PUSH ) func (x *TaskQueueUpdateQueueRequest) Reset() { *x = TaskQueueUpdateQueueRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueUpdateQueueRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueUpdateQueueRequest) ProtoMessage() {} func (x *TaskQueueUpdateQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueUpdateQueueRequest.ProtoReflect.Descriptor instead. func (*TaskQueueUpdateQueueRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{14} } func (x *TaskQueueUpdateQueueRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueUpdateQueueRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueUpdateQueueRequest) GetBucketRefillPerSecond() float64 { if x != nil && x.BucketRefillPerSecond != nil { return *x.BucketRefillPerSecond } return 0 } func (x *TaskQueueUpdateQueueRequest) GetBucketCapacity() int32 { if x != nil && x.BucketCapacity != nil { return *x.BucketCapacity } return 0 } func (x *TaskQueueUpdateQueueRequest) GetUserSpecifiedRate() string { if x != nil && x.UserSpecifiedRate != nil { return *x.UserSpecifiedRate } return "" } func (x *TaskQueueUpdateQueueRequest) GetRetryParameters() *TaskQueueRetryParameters { if x != nil { return x.RetryParameters } return nil } func (x *TaskQueueUpdateQueueRequest) GetMaxConcurrentRequests() int32 { if x != nil && x.MaxConcurrentRequests != nil { return *x.MaxConcurrentRequests } return 0 } func (x *TaskQueueUpdateQueueRequest) GetMode() TaskQueueMode_Mode { if x != nil && x.Mode != nil { return *x.Mode } return Default_TaskQueueUpdateQueueRequest_Mode } func (x *TaskQueueUpdateQueueRequest) GetAcl() *TaskQueueAcl { if x != nil { return x.Acl } return nil } func (x *TaskQueueUpdateQueueRequest) GetHeaderOverride() []*TaskQueueHttpHeader { if x != nil { return x.HeaderOverride } return nil } type TaskQueueUpdateQueueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TaskQueueUpdateQueueResponse) Reset() { *x = TaskQueueUpdateQueueResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueUpdateQueueResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueUpdateQueueResponse) ProtoMessage() {} func (x *TaskQueueUpdateQueueResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueUpdateQueueResponse.ProtoReflect.Descriptor instead. func (*TaskQueueUpdateQueueResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{15} } type TaskQueueFetchQueuesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,opt,name=app_id,json=appId" json:"app_id,omitempty"` MaxRows *int32 `protobuf:"varint,2,req,name=max_rows,json=maxRows" json:"max_rows,omitempty"` } func (x *TaskQueueFetchQueuesRequest) Reset() { *x = TaskQueueFetchQueuesRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchQueuesRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchQueuesRequest) ProtoMessage() {} func (x *TaskQueueFetchQueuesRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueFetchQueuesRequest.ProtoReflect.Descriptor instead. func (*TaskQueueFetchQueuesRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{16} } func (x *TaskQueueFetchQueuesRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueFetchQueuesRequest) GetMaxRows() int32 { if x != nil && x.MaxRows != nil { return *x.MaxRows } return 0 } type TaskQueueFetchQueuesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Queue []*TaskQueueFetchQueuesResponse_Queue `protobuf:"group,1,rep,name=Queue,json=queue" json:"queue,omitempty"` } func (x *TaskQueueFetchQueuesResponse) Reset() { *x = TaskQueueFetchQueuesResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchQueuesResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchQueuesResponse) ProtoMessage() {} func (x *TaskQueueFetchQueuesResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueFetchQueuesResponse.ProtoReflect.Descriptor instead. func (*TaskQueueFetchQueuesResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{17} } func (x *TaskQueueFetchQueuesResponse) GetQueue() []*TaskQueueFetchQueuesResponse_Queue { if x != nil { return x.Queue } return nil } type TaskQueueFetchQueueStatsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,opt,name=app_id,json=appId" json:"app_id,omitempty"` QueueName [][]byte `protobuf:"bytes,2,rep,name=queue_name,json=queueName" json:"queue_name,omitempty"` MaxNumTasks *int32 `protobuf:"varint,3,opt,name=max_num_tasks,json=maxNumTasks,def=0" json:"max_num_tasks,omitempty"` } // Default values for TaskQueueFetchQueueStatsRequest fields. const ( Default_TaskQueueFetchQueueStatsRequest_MaxNumTasks = int32(0) ) func (x *TaskQueueFetchQueueStatsRequest) Reset() { *x = TaskQueueFetchQueueStatsRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchQueueStatsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchQueueStatsRequest) ProtoMessage() {} func (x *TaskQueueFetchQueueStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueFetchQueueStatsRequest.ProtoReflect.Descriptor instead. func (*TaskQueueFetchQueueStatsRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{18} } func (x *TaskQueueFetchQueueStatsRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueFetchQueueStatsRequest) GetQueueName() [][]byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueFetchQueueStatsRequest) GetMaxNumTasks() int32 { if x != nil && x.MaxNumTasks != nil { return *x.MaxNumTasks } return Default_TaskQueueFetchQueueStatsRequest_MaxNumTasks } type TaskQueueScannerQueueInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ExecutedLastMinute *int64 `protobuf:"varint,1,req,name=executed_last_minute,json=executedLastMinute" json:"executed_last_minute,omitempty"` ExecutedLastHour *int64 `protobuf:"varint,2,req,name=executed_last_hour,json=executedLastHour" json:"executed_last_hour,omitempty"` SamplingDurationSeconds *float64 `protobuf:"fixed64,3,req,name=sampling_duration_seconds,json=samplingDurationSeconds" json:"sampling_duration_seconds,omitempty"` RequestsInFlight *int32 `protobuf:"varint,4,opt,name=requests_in_flight,json=requestsInFlight" json:"requests_in_flight,omitempty"` EnforcedRate *float64 `protobuf:"fixed64,5,opt,name=enforced_rate,json=enforcedRate" json:"enforced_rate,omitempty"` } func (x *TaskQueueScannerQueueInfo) Reset() { *x = TaskQueueScannerQueueInfo{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueScannerQueueInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueScannerQueueInfo) ProtoMessage() {} func (x *TaskQueueScannerQueueInfo) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueScannerQueueInfo.ProtoReflect.Descriptor instead. func (*TaskQueueScannerQueueInfo) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{19} } func (x *TaskQueueScannerQueueInfo) GetExecutedLastMinute() int64 { if x != nil && x.ExecutedLastMinute != nil { return *x.ExecutedLastMinute } return 0 } func (x *TaskQueueScannerQueueInfo) GetExecutedLastHour() int64 { if x != nil && x.ExecutedLastHour != nil { return *x.ExecutedLastHour } return 0 } func (x *TaskQueueScannerQueueInfo) GetSamplingDurationSeconds() float64 { if x != nil && x.SamplingDurationSeconds != nil { return *x.SamplingDurationSeconds } return 0 } func (x *TaskQueueScannerQueueInfo) GetRequestsInFlight() int32 { if x != nil && x.RequestsInFlight != nil { return *x.RequestsInFlight } return 0 } func (x *TaskQueueScannerQueueInfo) GetEnforcedRate() float64 { if x != nil && x.EnforcedRate != nil { return *x.EnforcedRate } return 0 } type TaskQueueFetchQueueStatsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Queuestats []*TaskQueueFetchQueueStatsResponse_QueueStats `protobuf:"group,1,rep,name=QueueStats,json=queuestats" json:"queuestats,omitempty"` } func (x *TaskQueueFetchQueueStatsResponse) Reset() { *x = TaskQueueFetchQueueStatsResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchQueueStatsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchQueueStatsResponse) ProtoMessage() {} func (x *TaskQueueFetchQueueStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueFetchQueueStatsResponse.ProtoReflect.Descriptor instead. func (*TaskQueueFetchQueueStatsResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{20} } func (x *TaskQueueFetchQueueStatsResponse) GetQueuestats() []*TaskQueueFetchQueueStatsResponse_QueueStats { if x != nil { return x.Queuestats } return nil } type TaskQueuePauseQueueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` Pause *bool `protobuf:"varint,3,req,name=pause" json:"pause,omitempty"` } func (x *TaskQueuePauseQueueRequest) Reset() { *x = TaskQueuePauseQueueRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueuePauseQueueRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueuePauseQueueRequest) ProtoMessage() {} func (x *TaskQueuePauseQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueuePauseQueueRequest.ProtoReflect.Descriptor instead. func (*TaskQueuePauseQueueRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{21} } func (x *TaskQueuePauseQueueRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueuePauseQueueRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueuePauseQueueRequest) GetPause() bool { if x != nil && x.Pause != nil { return *x.Pause } return false } type TaskQueuePauseQueueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TaskQueuePauseQueueResponse) Reset() { *x = TaskQueuePauseQueueResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueuePauseQueueResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueuePauseQueueResponse) ProtoMessage() {} func (x *TaskQueuePauseQueueResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueuePauseQueueResponse.ProtoReflect.Descriptor instead. func (*TaskQueuePauseQueueResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{22} } type TaskQueuePurgeQueueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,opt,name=app_id,json=appId" json:"app_id,omitempty"` QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` } func (x *TaskQueuePurgeQueueRequest) Reset() { *x = TaskQueuePurgeQueueRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueuePurgeQueueRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueuePurgeQueueRequest) ProtoMessage() {} func (x *TaskQueuePurgeQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueuePurgeQueueRequest.ProtoReflect.Descriptor instead. func (*TaskQueuePurgeQueueRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{23} } func (x *TaskQueuePurgeQueueRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueuePurgeQueueRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } type TaskQueuePurgeQueueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TaskQueuePurgeQueueResponse) Reset() { *x = TaskQueuePurgeQueueResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueuePurgeQueueResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueuePurgeQueueResponse) ProtoMessage() {} func (x *TaskQueuePurgeQueueResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueuePurgeQueueResponse.ProtoReflect.Descriptor instead. func (*TaskQueuePurgeQueueResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{24} } type TaskQueueDeleteQueueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` } func (x *TaskQueueDeleteQueueRequest) Reset() { *x = TaskQueueDeleteQueueRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueDeleteQueueRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueDeleteQueueRequest) ProtoMessage() {} func (x *TaskQueueDeleteQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueDeleteQueueRequest.ProtoReflect.Descriptor instead. func (*TaskQueueDeleteQueueRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{25} } func (x *TaskQueueDeleteQueueRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueDeleteQueueRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } type TaskQueueDeleteQueueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TaskQueueDeleteQueueResponse) Reset() { *x = TaskQueueDeleteQueueResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueDeleteQueueResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueDeleteQueueResponse) ProtoMessage() {} func (x *TaskQueueDeleteQueueResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_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 TaskQueueDeleteQueueResponse.ProtoReflect.Descriptor instead. func (*TaskQueueDeleteQueueResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{26} } type TaskQueueDeleteGroupRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` } func (x *TaskQueueDeleteGroupRequest) Reset() { *x = TaskQueueDeleteGroupRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueDeleteGroupRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueDeleteGroupRequest) ProtoMessage() {} func (x *TaskQueueDeleteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueDeleteGroupRequest.ProtoReflect.Descriptor instead. func (*TaskQueueDeleteGroupRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{27} } func (x *TaskQueueDeleteGroupRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } type TaskQueueDeleteGroupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TaskQueueDeleteGroupResponse) Reset() { *x = TaskQueueDeleteGroupResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueDeleteGroupResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueDeleteGroupResponse) ProtoMessage() {} func (x *TaskQueueDeleteGroupResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueDeleteGroupResponse.ProtoReflect.Descriptor instead. func (*TaskQueueDeleteGroupResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{28} } type TaskQueueQueryTasksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,opt,name=app_id,json=appId" json:"app_id,omitempty"` QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` StartTaskName []byte `protobuf:"bytes,3,opt,name=start_task_name,json=startTaskName" json:"start_task_name,omitempty"` StartEtaUsec *int64 `protobuf:"varint,4,opt,name=start_eta_usec,json=startEtaUsec" json:"start_eta_usec,omitempty"` StartTag []byte `protobuf:"bytes,6,opt,name=start_tag,json=startTag" json:"start_tag,omitempty"` MaxRows *int32 `protobuf:"varint,5,opt,name=max_rows,json=maxRows,def=1" json:"max_rows,omitempty"` } // Default values for TaskQueueQueryTasksRequest fields. const ( Default_TaskQueueQueryTasksRequest_MaxRows = int32(1) ) func (x *TaskQueueQueryTasksRequest) Reset() { *x = TaskQueueQueryTasksRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryTasksRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryTasksRequest) ProtoMessage() {} func (x *TaskQueueQueryTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueQueryTasksRequest.ProtoReflect.Descriptor instead. func (*TaskQueueQueryTasksRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{29} } func (x *TaskQueueQueryTasksRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueQueryTasksRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueQueryTasksRequest) GetStartTaskName() []byte { if x != nil { return x.StartTaskName } return nil } func (x *TaskQueueQueryTasksRequest) GetStartEtaUsec() int64 { if x != nil && x.StartEtaUsec != nil { return *x.StartEtaUsec } return 0 } func (x *TaskQueueQueryTasksRequest) GetStartTag() []byte { if x != nil { return x.StartTag } return nil } func (x *TaskQueueQueryTasksRequest) GetMaxRows() int32 { if x != nil && x.MaxRows != nil { return *x.MaxRows } return Default_TaskQueueQueryTasksRequest_MaxRows } type TaskQueueQueryTasksResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Task []*TaskQueueQueryTasksResponse_Task `protobuf:"group,1,rep,name=Task,json=task" json:"task,omitempty"` } func (x *TaskQueueQueryTasksResponse) Reset() { *x = TaskQueueQueryTasksResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryTasksResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryTasksResponse) ProtoMessage() {} func (x *TaskQueueQueryTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueQueryTasksResponse.ProtoReflect.Descriptor instead. func (*TaskQueueQueryTasksResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{30} } func (x *TaskQueueQueryTasksResponse) GetTask() []*TaskQueueQueryTasksResponse_Task { if x != nil { return x.Task } return nil } type TaskQueueFetchTaskRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,opt,name=app_id,json=appId" json:"app_id,omitempty"` QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` TaskName []byte `protobuf:"bytes,3,req,name=task_name,json=taskName" json:"task_name,omitempty"` } func (x *TaskQueueFetchTaskRequest) Reset() { *x = TaskQueueFetchTaskRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchTaskRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchTaskRequest) ProtoMessage() {} func (x *TaskQueueFetchTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueFetchTaskRequest.ProtoReflect.Descriptor instead. func (*TaskQueueFetchTaskRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{31} } func (x *TaskQueueFetchTaskRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueFetchTaskRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueFetchTaskRequest) GetTaskName() []byte { if x != nil { return x.TaskName } return nil } type TaskQueueFetchTaskResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Task *TaskQueueQueryTasksResponse `protobuf:"bytes,1,req,name=task" json:"task,omitempty"` } func (x *TaskQueueFetchTaskResponse) Reset() { *x = TaskQueueFetchTaskResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchTaskResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchTaskResponse) ProtoMessage() {} func (x *TaskQueueFetchTaskResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueFetchTaskResponse.ProtoReflect.Descriptor instead. func (*TaskQueueFetchTaskResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{32} } func (x *TaskQueueFetchTaskResponse) GetTask() *TaskQueueQueryTasksResponse { if x != nil { return x.Task } return nil } type TaskQueueUpdateStorageLimitRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AppId []byte `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` Limit *int64 `protobuf:"varint,2,req,name=limit" json:"limit,omitempty"` } func (x *TaskQueueUpdateStorageLimitRequest) Reset() { *x = TaskQueueUpdateStorageLimitRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueUpdateStorageLimitRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueUpdateStorageLimitRequest) ProtoMessage() {} func (x *TaskQueueUpdateStorageLimitRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueUpdateStorageLimitRequest.ProtoReflect.Descriptor instead. func (*TaskQueueUpdateStorageLimitRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{33} } func (x *TaskQueueUpdateStorageLimitRequest) GetAppId() []byte { if x != nil { return x.AppId } return nil } func (x *TaskQueueUpdateStorageLimitRequest) GetLimit() int64 { if x != nil && x.Limit != nil { return *x.Limit } return 0 } type TaskQueueUpdateStorageLimitResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NewLimit *int64 `protobuf:"varint,1,req,name=new_limit,json=newLimit" json:"new_limit,omitempty"` } func (x *TaskQueueUpdateStorageLimitResponse) Reset() { *x = TaskQueueUpdateStorageLimitResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueUpdateStorageLimitResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueUpdateStorageLimitResponse) ProtoMessage() {} func (x *TaskQueueUpdateStorageLimitResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueUpdateStorageLimitResponse.ProtoReflect.Descriptor instead. func (*TaskQueueUpdateStorageLimitResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{34} } func (x *TaskQueueUpdateStorageLimitResponse) GetNewLimit() int64 { if x != nil && x.NewLimit != nil { return *x.NewLimit } return 0 } type TaskQueueQueryAndOwnTasksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields QueueName []byte `protobuf:"bytes,1,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` LeaseSeconds *float64 `protobuf:"fixed64,2,req,name=lease_seconds,json=leaseSeconds" json:"lease_seconds,omitempty"` MaxTasks *int64 `protobuf:"varint,3,req,name=max_tasks,json=maxTasks" json:"max_tasks,omitempty"` GroupByTag *bool `protobuf:"varint,4,opt,name=group_by_tag,json=groupByTag,def=0" json:"group_by_tag,omitempty"` Tag []byte `protobuf:"bytes,5,opt,name=tag" json:"tag,omitempty"` } // Default values for TaskQueueQueryAndOwnTasksRequest fields. const ( Default_TaskQueueQueryAndOwnTasksRequest_GroupByTag = bool(false) ) func (x *TaskQueueQueryAndOwnTasksRequest) Reset() { *x = TaskQueueQueryAndOwnTasksRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryAndOwnTasksRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryAndOwnTasksRequest) ProtoMessage() {} func (x *TaskQueueQueryAndOwnTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TaskQueueQueryAndOwnTasksRequest.ProtoReflect.Descriptor instead. func (*TaskQueueQueryAndOwnTasksRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{35} } func (x *TaskQueueQueryAndOwnTasksRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueQueryAndOwnTasksRequest) GetLeaseSeconds() float64 { if x != nil && x.LeaseSeconds != nil { return *x.LeaseSeconds } return 0 } func (x *TaskQueueQueryAndOwnTasksRequest) GetMaxTasks() int64 { if x != nil && x.MaxTasks != nil { return *x.MaxTasks } return 0 } func (x *TaskQueueQueryAndOwnTasksRequest) GetGroupByTag() bool { if x != nil && x.GroupByTag != nil { return *x.GroupByTag } return Default_TaskQueueQueryAndOwnTasksRequest_GroupByTag } func (x *TaskQueueQueryAndOwnTasksRequest) GetTag() []byte { if x != nil { return x.Tag } return nil } type TaskQueueQueryAndOwnTasksResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Task []*TaskQueueQueryAndOwnTasksResponse_Task `protobuf:"group,1,rep,name=Task,json=task" json:"task,omitempty"` } func (x *TaskQueueQueryAndOwnTasksResponse) Reset() { *x = TaskQueueQueryAndOwnTasksResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryAndOwnTasksResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryAndOwnTasksResponse) ProtoMessage() {} func (x *TaskQueueQueryAndOwnTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[36] 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 TaskQueueQueryAndOwnTasksResponse.ProtoReflect.Descriptor instead. func (*TaskQueueQueryAndOwnTasksResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{36} } func (x *TaskQueueQueryAndOwnTasksResponse) GetTask() []*TaskQueueQueryAndOwnTasksResponse_Task { if x != nil { return x.Task } return nil } type TaskQueueModifyTaskLeaseRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields QueueName []byte `protobuf:"bytes,1,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` TaskName []byte `protobuf:"bytes,2,req,name=task_name,json=taskName" json:"task_name,omitempty"` EtaUsec *int64 `protobuf:"varint,3,req,name=eta_usec,json=etaUsec" json:"eta_usec,omitempty"` LeaseSeconds *float64 `protobuf:"fixed64,4,req,name=lease_seconds,json=leaseSeconds" json:"lease_seconds,omitempty"` } func (x *TaskQueueModifyTaskLeaseRequest) Reset() { *x = TaskQueueModifyTaskLeaseRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueModifyTaskLeaseRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueModifyTaskLeaseRequest) ProtoMessage() {} func (x *TaskQueueModifyTaskLeaseRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[37] 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 TaskQueueModifyTaskLeaseRequest.ProtoReflect.Descriptor instead. func (*TaskQueueModifyTaskLeaseRequest) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{37} } func (x *TaskQueueModifyTaskLeaseRequest) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueModifyTaskLeaseRequest) GetTaskName() []byte { if x != nil { return x.TaskName } return nil } func (x *TaskQueueModifyTaskLeaseRequest) GetEtaUsec() int64 { if x != nil && x.EtaUsec != nil { return *x.EtaUsec } return 0 } func (x *TaskQueueModifyTaskLeaseRequest) GetLeaseSeconds() float64 { if x != nil && x.LeaseSeconds != nil { return *x.LeaseSeconds } return 0 } type TaskQueueModifyTaskLeaseResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields UpdatedEtaUsec *int64 `protobuf:"varint,1,req,name=updated_eta_usec,json=updatedEtaUsec" json:"updated_eta_usec,omitempty"` } func (x *TaskQueueModifyTaskLeaseResponse) Reset() { *x = TaskQueueModifyTaskLeaseResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueModifyTaskLeaseResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueModifyTaskLeaseResponse) ProtoMessage() {} func (x *TaskQueueModifyTaskLeaseResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[38] 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 TaskQueueModifyTaskLeaseResponse.ProtoReflect.Descriptor instead. func (*TaskQueueModifyTaskLeaseResponse) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{38} } func (x *TaskQueueModifyTaskLeaseResponse) GetUpdatedEtaUsec() int64 { if x != nil && x.UpdatedEtaUsec != nil { return *x.UpdatedEtaUsec } return 0 } type TaskQueueAddRequest_Header struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key []byte `protobuf:"bytes,7,req,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,8,req,name=value" json:"value,omitempty"` } func (x *TaskQueueAddRequest_Header) Reset() { *x = TaskQueueAddRequest_Header{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueAddRequest_Header) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueAddRequest_Header) ProtoMessage() {} func (x *TaskQueueAddRequest_Header) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[39] 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 TaskQueueAddRequest_Header.ProtoReflect.Descriptor instead. func (*TaskQueueAddRequest_Header) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{6, 0} } func (x *TaskQueueAddRequest_Header) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *TaskQueueAddRequest_Header) GetValue() []byte { if x != nil { return x.Value } return nil } type TaskQueueAddRequest_CronTimetable struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Schedule []byte `protobuf:"bytes,13,req,name=schedule" json:"schedule,omitempty"` Timezone []byte `protobuf:"bytes,14,req,name=timezone" json:"timezone,omitempty"` } func (x *TaskQueueAddRequest_CronTimetable) Reset() { *x = TaskQueueAddRequest_CronTimetable{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueAddRequest_CronTimetable) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueAddRequest_CronTimetable) ProtoMessage() {} func (x *TaskQueueAddRequest_CronTimetable) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[40] 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 TaskQueueAddRequest_CronTimetable.ProtoReflect.Descriptor instead. func (*TaskQueueAddRequest_CronTimetable) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{6, 1} } func (x *TaskQueueAddRequest_CronTimetable) GetSchedule() []byte { if x != nil { return x.Schedule } return nil } func (x *TaskQueueAddRequest_CronTimetable) GetTimezone() []byte { if x != nil { return x.Timezone } return nil } type TaskQueueBulkAddResponse_TaskResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result *TaskQueueServiceError_ErrorCode `protobuf:"varint,2,req,name=result,enum=appengine.v2.TaskQueueServiceError_ErrorCode" json:"result,omitempty"` ChosenTaskName []byte `protobuf:"bytes,3,opt,name=chosen_task_name,json=chosenTaskName" json:"chosen_task_name,omitempty"` } func (x *TaskQueueBulkAddResponse_TaskResult) Reset() { *x = TaskQueueBulkAddResponse_TaskResult{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueBulkAddResponse_TaskResult) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueBulkAddResponse_TaskResult) ProtoMessage() {} func (x *TaskQueueBulkAddResponse_TaskResult) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[41] 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 TaskQueueBulkAddResponse_TaskResult.ProtoReflect.Descriptor instead. func (*TaskQueueBulkAddResponse_TaskResult) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{9, 0} } func (x *TaskQueueBulkAddResponse_TaskResult) GetResult() TaskQueueServiceError_ErrorCode { if x != nil && x.Result != nil { return *x.Result } return TaskQueueServiceError_OK } func (x *TaskQueueBulkAddResponse_TaskResult) GetChosenTaskName() []byte { if x != nil { return x.ChosenTaskName } return nil } type TaskQueueFetchQueuesResponse_Queue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields QueueName []byte `protobuf:"bytes,2,req,name=queue_name,json=queueName" json:"queue_name,omitempty"` BucketRefillPerSecond *float64 `protobuf:"fixed64,3,req,name=bucket_refill_per_second,json=bucketRefillPerSecond" json:"bucket_refill_per_second,omitempty"` BucketCapacity *float64 `protobuf:"fixed64,4,req,name=bucket_capacity,json=bucketCapacity" json:"bucket_capacity,omitempty"` UserSpecifiedRate *string `protobuf:"bytes,5,opt,name=user_specified_rate,json=userSpecifiedRate" json:"user_specified_rate,omitempty"` Paused *bool `protobuf:"varint,6,req,name=paused,def=0" json:"paused,omitempty"` RetryParameters *TaskQueueRetryParameters `protobuf:"bytes,7,opt,name=retry_parameters,json=retryParameters" json:"retry_parameters,omitempty"` MaxConcurrentRequests *int32 `protobuf:"varint,8,opt,name=max_concurrent_requests,json=maxConcurrentRequests" json:"max_concurrent_requests,omitempty"` Mode *TaskQueueMode_Mode `protobuf:"varint,9,opt,name=mode,enum=appengine.v2.TaskQueueMode_Mode,def=0" json:"mode,omitempty"` Acl *TaskQueueAcl `protobuf:"bytes,10,opt,name=acl" json:"acl,omitempty"` HeaderOverride []*TaskQueueHttpHeader `protobuf:"bytes,11,rep,name=header_override,json=headerOverride" json:"header_override,omitempty"` CreatorName *string `protobuf:"bytes,12,opt,name=creator_name,json=creatorName,def=apphosting" json:"creator_name,omitempty"` } // Default values for TaskQueueFetchQueuesResponse_Queue fields. const ( Default_TaskQueueFetchQueuesResponse_Queue_Paused = bool(false) Default_TaskQueueFetchQueuesResponse_Queue_Mode = TaskQueueMode_PUSH Default_TaskQueueFetchQueuesResponse_Queue_CreatorName = string("apphosting") ) func (x *TaskQueueFetchQueuesResponse_Queue) Reset() { *x = TaskQueueFetchQueuesResponse_Queue{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchQueuesResponse_Queue) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchQueuesResponse_Queue) ProtoMessage() {} func (x *TaskQueueFetchQueuesResponse_Queue) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[42] 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 TaskQueueFetchQueuesResponse_Queue.ProtoReflect.Descriptor instead. func (*TaskQueueFetchQueuesResponse_Queue) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{17, 0} } func (x *TaskQueueFetchQueuesResponse_Queue) GetQueueName() []byte { if x != nil { return x.QueueName } return nil } func (x *TaskQueueFetchQueuesResponse_Queue) GetBucketRefillPerSecond() float64 { if x != nil && x.BucketRefillPerSecond != nil { return *x.BucketRefillPerSecond } return 0 } func (x *TaskQueueFetchQueuesResponse_Queue) GetBucketCapacity() float64 { if x != nil && x.BucketCapacity != nil { return *x.BucketCapacity } return 0 } func (x *TaskQueueFetchQueuesResponse_Queue) GetUserSpecifiedRate() string { if x != nil && x.UserSpecifiedRate != nil { return *x.UserSpecifiedRate } return "" } func (x *TaskQueueFetchQueuesResponse_Queue) GetPaused() bool { if x != nil && x.Paused != nil { return *x.Paused } return Default_TaskQueueFetchQueuesResponse_Queue_Paused } func (x *TaskQueueFetchQueuesResponse_Queue) GetRetryParameters() *TaskQueueRetryParameters { if x != nil { return x.RetryParameters } return nil } func (x *TaskQueueFetchQueuesResponse_Queue) GetMaxConcurrentRequests() int32 { if x != nil && x.MaxConcurrentRequests != nil { return *x.MaxConcurrentRequests } return 0 } func (x *TaskQueueFetchQueuesResponse_Queue) GetMode() TaskQueueMode_Mode { if x != nil && x.Mode != nil { return *x.Mode } return Default_TaskQueueFetchQueuesResponse_Queue_Mode } func (x *TaskQueueFetchQueuesResponse_Queue) GetAcl() *TaskQueueAcl { if x != nil { return x.Acl } return nil } func (x *TaskQueueFetchQueuesResponse_Queue) GetHeaderOverride() []*TaskQueueHttpHeader { if x != nil { return x.HeaderOverride } return nil } func (x *TaskQueueFetchQueuesResponse_Queue) GetCreatorName() string { if x != nil && x.CreatorName != nil { return *x.CreatorName } return Default_TaskQueueFetchQueuesResponse_Queue_CreatorName } type TaskQueueFetchQueueStatsResponse_QueueStats struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NumTasks *int32 `protobuf:"varint,2,req,name=num_tasks,json=numTasks" json:"num_tasks,omitempty"` OldestEtaUsec *int64 `protobuf:"varint,3,req,name=oldest_eta_usec,json=oldestEtaUsec" json:"oldest_eta_usec,omitempty"` ScannerInfo *TaskQueueScannerQueueInfo `protobuf:"bytes,4,opt,name=scanner_info,json=scannerInfo" json:"scanner_info,omitempty"` } func (x *TaskQueueFetchQueueStatsResponse_QueueStats) Reset() { *x = TaskQueueFetchQueueStatsResponse_QueueStats{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueFetchQueueStatsResponse_QueueStats) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueFetchQueueStatsResponse_QueueStats) ProtoMessage() {} func (x *TaskQueueFetchQueueStatsResponse_QueueStats) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[43] 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 TaskQueueFetchQueueStatsResponse_QueueStats.ProtoReflect.Descriptor instead. func (*TaskQueueFetchQueueStatsResponse_QueueStats) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{20, 0} } func (x *TaskQueueFetchQueueStatsResponse_QueueStats) GetNumTasks() int32 { if x != nil && x.NumTasks != nil { return *x.NumTasks } return 0 } func (x *TaskQueueFetchQueueStatsResponse_QueueStats) GetOldestEtaUsec() int64 { if x != nil && x.OldestEtaUsec != nil { return *x.OldestEtaUsec } return 0 } func (x *TaskQueueFetchQueueStatsResponse_QueueStats) GetScannerInfo() *TaskQueueScannerQueueInfo { if x != nil { return x.ScannerInfo } return nil } type TaskQueueQueryTasksResponse_Task struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields TaskName []byte `protobuf:"bytes,2,req,name=task_name,json=taskName" json:"task_name,omitempty"` EtaUsec *int64 `protobuf:"varint,3,req,name=eta_usec,json=etaUsec" json:"eta_usec,omitempty"` Url []byte `protobuf:"bytes,4,opt,name=url" json:"url,omitempty"` Method *TaskQueueQueryTasksResponse_Task_RequestMethod `protobuf:"varint,5,opt,name=method,enum=appengine.v2.TaskQueueQueryTasksResponse_Task_RequestMethod" json:"method,omitempty"` RetryCount *int32 `protobuf:"varint,6,opt,name=retry_count,json=retryCount,def=0" json:"retry_count,omitempty"` Header []*TaskQueueQueryTasksResponse_Task_Header `protobuf:"group,7,rep,name=Header,json=header" json:"header,omitempty"` BodySize *int32 `protobuf:"varint,10,opt,name=body_size,json=bodySize" json:"body_size,omitempty"` Body []byte `protobuf:"bytes,11,opt,name=body" json:"body,omitempty"` CreationTimeUsec *int64 `protobuf:"varint,12,req,name=creation_time_usec,json=creationTimeUsec" json:"creation_time_usec,omitempty"` Crontimetable *TaskQueueQueryTasksResponse_Task_CronTimetable `protobuf:"group,13,opt,name=CronTimetable,json=crontimetable" json:"crontimetable,omitempty"` Runlog *TaskQueueQueryTasksResponse_Task_RunLog `protobuf:"group,16,opt,name=RunLog,json=runlog" json:"runlog,omitempty"` Description []byte `protobuf:"bytes,21,opt,name=description" json:"description,omitempty"` Payload *TaskPayload `protobuf:"bytes,22,opt,name=payload" json:"payload,omitempty"` RetryParameters *TaskQueueRetryParameters `protobuf:"bytes,23,opt,name=retry_parameters,json=retryParameters" json:"retry_parameters,omitempty"` FirstTryUsec *int64 `protobuf:"varint,24,opt,name=first_try_usec,json=firstTryUsec" json:"first_try_usec,omitempty"` Tag []byte `protobuf:"bytes,25,opt,name=tag" json:"tag,omitempty"` ExecutionCount *int32 `protobuf:"varint,26,opt,name=execution_count,json=executionCount,def=0" json:"execution_count,omitempty"` } // Default values for TaskQueueQueryTasksResponse_Task fields. const ( Default_TaskQueueQueryTasksResponse_Task_RetryCount = int32(0) Default_TaskQueueQueryTasksResponse_Task_ExecutionCount = int32(0) ) func (x *TaskQueueQueryTasksResponse_Task) Reset() { *x = TaskQueueQueryTasksResponse_Task{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryTasksResponse_Task) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryTasksResponse_Task) ProtoMessage() {} func (x *TaskQueueQueryTasksResponse_Task) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[44] 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 TaskQueueQueryTasksResponse_Task.ProtoReflect.Descriptor instead. func (*TaskQueueQueryTasksResponse_Task) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{30, 0} } func (x *TaskQueueQueryTasksResponse_Task) GetTaskName() []byte { if x != nil { return x.TaskName } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetEtaUsec() int64 { if x != nil && x.EtaUsec != nil { return *x.EtaUsec } return 0 } func (x *TaskQueueQueryTasksResponse_Task) GetUrl() []byte { if x != nil { return x.Url } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetMethod() TaskQueueQueryTasksResponse_Task_RequestMethod { if x != nil && x.Method != nil { return *x.Method } return TaskQueueQueryTasksResponse_Task_GET } func (x *TaskQueueQueryTasksResponse_Task) GetRetryCount() int32 { if x != nil && x.RetryCount != nil { return *x.RetryCount } return Default_TaskQueueQueryTasksResponse_Task_RetryCount } func (x *TaskQueueQueryTasksResponse_Task) GetHeader() []*TaskQueueQueryTasksResponse_Task_Header { if x != nil { return x.Header } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetBodySize() int32 { if x != nil && x.BodySize != nil { return *x.BodySize } return 0 } func (x *TaskQueueQueryTasksResponse_Task) GetBody() []byte { if x != nil { return x.Body } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetCreationTimeUsec() int64 { if x != nil && x.CreationTimeUsec != nil { return *x.CreationTimeUsec } return 0 } func (x *TaskQueueQueryTasksResponse_Task) GetCrontimetable() *TaskQueueQueryTasksResponse_Task_CronTimetable { if x != nil { return x.Crontimetable } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetRunlog() *TaskQueueQueryTasksResponse_Task_RunLog { if x != nil { return x.Runlog } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetDescription() []byte { if x != nil { return x.Description } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetPayload() *TaskPayload { if x != nil { return x.Payload } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetRetryParameters() *TaskQueueRetryParameters { if x != nil { return x.RetryParameters } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetFirstTryUsec() int64 { if x != nil && x.FirstTryUsec != nil { return *x.FirstTryUsec } return 0 } func (x *TaskQueueQueryTasksResponse_Task) GetTag() []byte { if x != nil { return x.Tag } return nil } func (x *TaskQueueQueryTasksResponse_Task) GetExecutionCount() int32 { if x != nil && x.ExecutionCount != nil { return *x.ExecutionCount } return Default_TaskQueueQueryTasksResponse_Task_ExecutionCount } type TaskQueueQueryTasksResponse_Task_Header struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key []byte `protobuf:"bytes,8,req,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,9,req,name=value" json:"value,omitempty"` } func (x *TaskQueueQueryTasksResponse_Task_Header) Reset() { *x = TaskQueueQueryTasksResponse_Task_Header{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryTasksResponse_Task_Header) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryTasksResponse_Task_Header) ProtoMessage() {} func (x *TaskQueueQueryTasksResponse_Task_Header) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[45] 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 TaskQueueQueryTasksResponse_Task_Header.ProtoReflect.Descriptor instead. func (*TaskQueueQueryTasksResponse_Task_Header) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{30, 0, 0} } func (x *TaskQueueQueryTasksResponse_Task_Header) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *TaskQueueQueryTasksResponse_Task_Header) GetValue() []byte { if x != nil { return x.Value } return nil } type TaskQueueQueryTasksResponse_Task_CronTimetable struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Schedule []byte `protobuf:"bytes,14,req,name=schedule" json:"schedule,omitempty"` Timezone []byte `protobuf:"bytes,15,req,name=timezone" json:"timezone,omitempty"` } func (x *TaskQueueQueryTasksResponse_Task_CronTimetable) Reset() { *x = TaskQueueQueryTasksResponse_Task_CronTimetable{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryTasksResponse_Task_CronTimetable) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryTasksResponse_Task_CronTimetable) ProtoMessage() {} func (x *TaskQueueQueryTasksResponse_Task_CronTimetable) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[46] 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 TaskQueueQueryTasksResponse_Task_CronTimetable.ProtoReflect.Descriptor instead. func (*TaskQueueQueryTasksResponse_Task_CronTimetable) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{30, 0, 1} } func (x *TaskQueueQueryTasksResponse_Task_CronTimetable) GetSchedule() []byte { if x != nil { return x.Schedule } return nil } func (x *TaskQueueQueryTasksResponse_Task_CronTimetable) GetTimezone() []byte { if x != nil { return x.Timezone } return nil } type TaskQueueQueryTasksResponse_Task_RunLog struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DispatchedUsec *int64 `protobuf:"varint,17,req,name=dispatched_usec,json=dispatchedUsec" json:"dispatched_usec,omitempty"` LagUsec *int64 `protobuf:"varint,18,req,name=lag_usec,json=lagUsec" json:"lag_usec,omitempty"` ElapsedUsec *int64 `protobuf:"varint,19,req,name=elapsed_usec,json=elapsedUsec" json:"elapsed_usec,omitempty"` ResponseCode *int64 `protobuf:"varint,20,opt,name=response_code,json=responseCode" json:"response_code,omitempty"` RetryReason *string `protobuf:"bytes,27,opt,name=retry_reason,json=retryReason" json:"retry_reason,omitempty"` } func (x *TaskQueueQueryTasksResponse_Task_RunLog) Reset() { *x = TaskQueueQueryTasksResponse_Task_RunLog{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryTasksResponse_Task_RunLog) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryTasksResponse_Task_RunLog) ProtoMessage() {} func (x *TaskQueueQueryTasksResponse_Task_RunLog) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[47] 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 TaskQueueQueryTasksResponse_Task_RunLog.ProtoReflect.Descriptor instead. func (*TaskQueueQueryTasksResponse_Task_RunLog) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{30, 0, 2} } func (x *TaskQueueQueryTasksResponse_Task_RunLog) GetDispatchedUsec() int64 { if x != nil && x.DispatchedUsec != nil { return *x.DispatchedUsec } return 0 } func (x *TaskQueueQueryTasksResponse_Task_RunLog) GetLagUsec() int64 { if x != nil && x.LagUsec != nil { return *x.LagUsec } return 0 } func (x *TaskQueueQueryTasksResponse_Task_RunLog) GetElapsedUsec() int64 { if x != nil && x.ElapsedUsec != nil { return *x.ElapsedUsec } return 0 } func (x *TaskQueueQueryTasksResponse_Task_RunLog) GetResponseCode() int64 { if x != nil && x.ResponseCode != nil { return *x.ResponseCode } return 0 } func (x *TaskQueueQueryTasksResponse_Task_RunLog) GetRetryReason() string { if x != nil && x.RetryReason != nil { return *x.RetryReason } return "" } type TaskQueueQueryAndOwnTasksResponse_Task struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields TaskName []byte `protobuf:"bytes,2,req,name=task_name,json=taskName" json:"task_name,omitempty"` EtaUsec *int64 `protobuf:"varint,3,req,name=eta_usec,json=etaUsec" json:"eta_usec,omitempty"` RetryCount *int32 `protobuf:"varint,4,opt,name=retry_count,json=retryCount,def=0" json:"retry_count,omitempty"` Body []byte `protobuf:"bytes,5,opt,name=body" json:"body,omitempty"` Tag []byte `protobuf:"bytes,6,opt,name=tag" json:"tag,omitempty"` } // Default values for TaskQueueQueryAndOwnTasksResponse_Task fields. const ( Default_TaskQueueQueryAndOwnTasksResponse_Task_RetryCount = int32(0) ) func (x *TaskQueueQueryAndOwnTasksResponse_Task) Reset() { *x = TaskQueueQueryAndOwnTasksResponse_Task{} if protoimpl.UnsafeEnabled { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TaskQueueQueryAndOwnTasksResponse_Task) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskQueueQueryAndOwnTasksResponse_Task) ProtoMessage() {} func (x *TaskQueueQueryAndOwnTasksResponse_Task) ProtoReflect() protoreflect.Message { mi := &file_internal_taskqueue_taskqueue_service_proto_msgTypes[48] 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 TaskQueueQueryAndOwnTasksResponse_Task.ProtoReflect.Descriptor instead. func (*TaskQueueQueryAndOwnTasksResponse_Task) Descriptor() ([]byte, []int) { return file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP(), []int{36, 0} } func (x *TaskQueueQueryAndOwnTasksResponse_Task) GetTaskName() []byte { if x != nil { return x.TaskName } return nil } func (x *TaskQueueQueryAndOwnTasksResponse_Task) GetEtaUsec() int64 { if x != nil && x.EtaUsec != nil { return *x.EtaUsec } return 0 } func (x *TaskQueueQueryAndOwnTasksResponse_Task) GetRetryCount() int32 { if x != nil && x.RetryCount != nil { return *x.RetryCount } return Default_TaskQueueQueryAndOwnTasksResponse_Task_RetryCount } func (x *TaskQueueQueryAndOwnTasksResponse_Task) GetBody() []byte { if x != nil { return x.Body } return nil } func (x *TaskQueueQueryAndOwnTasksResponse_Task) GetTag() []byte { if x != nil { return x.Tag } return nil } var File_internal_taskqueue_taskqueue_service_proto protoreflect.FileDescriptor var file_internal_taskqueue_taskqueue_service_proto_rawDesc = []byte{ 0x0a, 0x2a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x1a, 0x25, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x05, 0x0a, 0x15, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xfb, 0x04, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x55, 0x52, 0x4c, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x44, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x45, 0x54, 0x41, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x0d, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x0f, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x10, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x11, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x53, 0x10, 0x12, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x13, 0x12, 0x1c, 0x0a, 0x18, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x59, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x10, 0x14, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x15, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x4c, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x16, 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x17, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x18, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x19, 0x12, 0x10, 0x0a, 0x0c, 0x51, 0x55, 0x45, 0x55, 0x45, 0x5f, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x1a, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x41, 0x47, 0x10, 0x1b, 0x12, 0x14, 0x0a, 0x0f, 0x44, 0x41, 0x54, 0x41, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x90, 0x4e, 0x22, 0x1b, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x08, 0x08, 0x0a, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x3a, 0x02, 0x08, 0x01, 0x22, 0xe3, 0x01, 0x0a, 0x18, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x63, 0x12, 0x2b, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x3a, 0x03, 0x30, 0x2e, 0x31, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x53, 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x3a, 0x04, 0x33, 0x36, 0x30, 0x30, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x53, 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x02, 0x31, 0x36, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x50, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x63, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3d, 0x0a, 0x13, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x1a, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x55, 0x53, 0x48, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x22, 0x88, 0x07, 0x0a, 0x13, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x65, 0x74, 0x61, 0x55, 0x73, 0x65, 0x63, 0x12, 0x4d, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x40, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x28, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x08, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x2f, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x51, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x04, 0x50, 0x55, 0x53, 0x48, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x61, 0x67, 0x1a, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x47, 0x0a, 0x0d, 0x43, 0x72, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x22, 0x41, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x22, 0x40, 0x0a, 0x14, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x68, 0x6f, 0x73, 0x65, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x63, 0x68, 0x6f, 0x73, 0x65, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5d, 0x0a, 0x17, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xec, 0x01, 0x0a, 0x18, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x31, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x7d, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x68, 0x6f, 0x73, 0x65, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x63, 0x68, 0x6f, 0x73, 0x65, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6b, 0x0a, 0x16, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x17, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x6d, 0x0a, 0x18, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x19, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa6, 0x04, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x01, 0x52, 0x15, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x51, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x04, 0x50, 0x55, 0x53, 0x48, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x63, 0x6c, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x4a, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x22, 0xb4, 0x05, 0x0a, 0x1c, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x30, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x1a, 0xcb, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x01, 0x52, 0x15, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x01, 0x52, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x70, 0x61, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x06, 0x70, 0x61, 0x75, 0x73, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x04, 0x50, 0x55, 0x53, 0x48, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x41, 0x63, 0x6c, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x4a, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x0a, 0x61, 0x70, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7e, 0x0a, 0x1f, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x8a, 0x02, 0x0a, 0x19, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x51, 0x75, 0x65, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x4c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x75, 0x72, 0x12, 0x3a, 0x0a, 0x19, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x01, 0x52, 0x17, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x22, 0x9d, 0x02, 0x0a, 0x20, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x39, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x9d, 0x01, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x45, 0x74, 0x61, 0x55, 0x73, 0x65, 0x63, 0x12, 0x4a, 0x0a, 0x0c, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x51, 0x75, 0x65, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x1a, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x75, 0x73, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x05, 0x70, 0x61, 0x75, 0x73, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x1a, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x1a, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x74, 0x61, 0x55, 0x73, 0x65, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x31, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x52, 0x6f, 0x77, 0x73, 0x22, 0x99, 0x0a, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x2e, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x1a, 0xb5, 0x09, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x65, 0x74, 0x61, 0x55, 0x73, 0x65, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x22, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x35, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x64, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x08, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x03, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x63, 0x12, 0x62, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x3c, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x6c, 0x6f, 0x67, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x35, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x06, 0x72, 0x75, 0x6e, 0x6c, 0x6f, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x51, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x18, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x54, 0x72, 0x79, 0x55, 0x73, 0x65, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x47, 0x0a, 0x0d, 0x43, 0x72, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x1a, 0xb7, 0x01, 0x0a, 0x06, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x11, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x55, 0x73, 0x65, 0x63, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x67, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x12, 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x6c, 0x61, 0x67, 0x55, 0x73, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x13, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x55, 0x73, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x41, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x22, 0x6e, 0x0a, 0x19, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5b, 0x0a, 0x1a, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x51, 0x0a, 0x22, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x42, 0x0a, 0x23, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xbe, 0x01, 0x0a, 0x20, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x64, 0x4f, 0x77, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x01, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x27, 0x0a, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0xfc, 0x01, 0x0a, 0x21, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x64, 0x4f, 0x77, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x34, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x64, 0x4f, 0x77, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x1a, 0x8c, 0x01, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x65, 0x74, 0x61, 0x55, 0x73, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x30, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x08, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x9d, 0x01, 0x0a, 0x1f, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x65, 0x74, 0x61, 0x55, 0x73, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x01, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x4c, 0x0a, 0x20, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x45, 0x74, 0x61, 0x55, 0x73, 0x65, 0x63, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x71, 0x75, 0x65, 0x75, 0x65, } var ( file_internal_taskqueue_taskqueue_service_proto_rawDescOnce sync.Once file_internal_taskqueue_taskqueue_service_proto_rawDescData = file_internal_taskqueue_taskqueue_service_proto_rawDesc ) func file_internal_taskqueue_taskqueue_service_proto_rawDescGZIP() []byte { file_internal_taskqueue_taskqueue_service_proto_rawDescOnce.Do(func() { file_internal_taskqueue_taskqueue_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_taskqueue_taskqueue_service_proto_rawDescData) }) return file_internal_taskqueue_taskqueue_service_proto_rawDescData } var file_internal_taskqueue_taskqueue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_internal_taskqueue_taskqueue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 49) var file_internal_taskqueue_taskqueue_service_proto_goTypes = []interface{}{ (TaskQueueServiceError_ErrorCode)(0), // 0: appengine.v2.TaskQueueServiceError.ErrorCode (TaskQueueMode_Mode)(0), // 1: appengine.v2.TaskQueueMode.Mode (TaskQueueAddRequest_RequestMethod)(0), // 2: appengine.v2.TaskQueueAddRequest.RequestMethod (TaskQueueQueryTasksResponse_Task_RequestMethod)(0), // 3: appengine.v2.TaskQueueQueryTasksResponse.Task.RequestMethod (*TaskQueueServiceError)(nil), // 4: appengine.v2.TaskQueueServiceError (*TaskPayload)(nil), // 5: appengine.v2.TaskPayload (*TaskQueueRetryParameters)(nil), // 6: appengine.v2.TaskQueueRetryParameters (*TaskQueueAcl)(nil), // 7: appengine.v2.TaskQueueAcl (*TaskQueueHttpHeader)(nil), // 8: appengine.v2.TaskQueueHttpHeader (*TaskQueueMode)(nil), // 9: appengine.v2.TaskQueueMode (*TaskQueueAddRequest)(nil), // 10: appengine.v2.TaskQueueAddRequest (*TaskQueueAddResponse)(nil), // 11: appengine.v2.TaskQueueAddResponse (*TaskQueueBulkAddRequest)(nil), // 12: appengine.v2.TaskQueueBulkAddRequest (*TaskQueueBulkAddResponse)(nil), // 13: appengine.v2.TaskQueueBulkAddResponse (*TaskQueueDeleteRequest)(nil), // 14: appengine.v2.TaskQueueDeleteRequest (*TaskQueueDeleteResponse)(nil), // 15: appengine.v2.TaskQueueDeleteResponse (*TaskQueueForceRunRequest)(nil), // 16: appengine.v2.TaskQueueForceRunRequest (*TaskQueueForceRunResponse)(nil), // 17: appengine.v2.TaskQueueForceRunResponse (*TaskQueueUpdateQueueRequest)(nil), // 18: appengine.v2.TaskQueueUpdateQueueRequest (*TaskQueueUpdateQueueResponse)(nil), // 19: appengine.v2.TaskQueueUpdateQueueResponse (*TaskQueueFetchQueuesRequest)(nil), // 20: appengine.v2.TaskQueueFetchQueuesRequest (*TaskQueueFetchQueuesResponse)(nil), // 21: appengine.v2.TaskQueueFetchQueuesResponse (*TaskQueueFetchQueueStatsRequest)(nil), // 22: appengine.v2.TaskQueueFetchQueueStatsRequest (*TaskQueueScannerQueueInfo)(nil), // 23: appengine.v2.TaskQueueScannerQueueInfo (*TaskQueueFetchQueueStatsResponse)(nil), // 24: appengine.v2.TaskQueueFetchQueueStatsResponse (*TaskQueuePauseQueueRequest)(nil), // 25: appengine.v2.TaskQueuePauseQueueRequest (*TaskQueuePauseQueueResponse)(nil), // 26: appengine.v2.TaskQueuePauseQueueResponse (*TaskQueuePurgeQueueRequest)(nil), // 27: appengine.v2.TaskQueuePurgeQueueRequest (*TaskQueuePurgeQueueResponse)(nil), // 28: appengine.v2.TaskQueuePurgeQueueResponse (*TaskQueueDeleteQueueRequest)(nil), // 29: appengine.v2.TaskQueueDeleteQueueRequest (*TaskQueueDeleteQueueResponse)(nil), // 30: appengine.v2.TaskQueueDeleteQueueResponse (*TaskQueueDeleteGroupRequest)(nil), // 31: appengine.v2.TaskQueueDeleteGroupRequest (*TaskQueueDeleteGroupResponse)(nil), // 32: appengine.v2.TaskQueueDeleteGroupResponse (*TaskQueueQueryTasksRequest)(nil), // 33: appengine.v2.TaskQueueQueryTasksRequest (*TaskQueueQueryTasksResponse)(nil), // 34: appengine.v2.TaskQueueQueryTasksResponse (*TaskQueueFetchTaskRequest)(nil), // 35: appengine.v2.TaskQueueFetchTaskRequest (*TaskQueueFetchTaskResponse)(nil), // 36: appengine.v2.TaskQueueFetchTaskResponse (*TaskQueueUpdateStorageLimitRequest)(nil), // 37: appengine.v2.TaskQueueUpdateStorageLimitRequest (*TaskQueueUpdateStorageLimitResponse)(nil), // 38: appengine.v2.TaskQueueUpdateStorageLimitResponse (*TaskQueueQueryAndOwnTasksRequest)(nil), // 39: appengine.v2.TaskQueueQueryAndOwnTasksRequest (*TaskQueueQueryAndOwnTasksResponse)(nil), // 40: appengine.v2.TaskQueueQueryAndOwnTasksResponse (*TaskQueueModifyTaskLeaseRequest)(nil), // 41: appengine.v2.TaskQueueModifyTaskLeaseRequest (*TaskQueueModifyTaskLeaseResponse)(nil), // 42: appengine.v2.TaskQueueModifyTaskLeaseResponse (*TaskQueueAddRequest_Header)(nil), // 43: appengine.v2.TaskQueueAddRequest.Header (*TaskQueueAddRequest_CronTimetable)(nil), // 44: appengine.v2.TaskQueueAddRequest.CronTimetable (*TaskQueueBulkAddResponse_TaskResult)(nil), // 45: appengine.v2.TaskQueueBulkAddResponse.TaskResult (*TaskQueueFetchQueuesResponse_Queue)(nil), // 46: appengine.v2.TaskQueueFetchQueuesResponse.Queue (*TaskQueueFetchQueueStatsResponse_QueueStats)(nil), // 47: appengine.v2.TaskQueueFetchQueueStatsResponse.QueueStats (*TaskQueueQueryTasksResponse_Task)(nil), // 48: appengine.v2.TaskQueueQueryTasksResponse.Task (*TaskQueueQueryTasksResponse_Task_Header)(nil), // 49: appengine.v2.TaskQueueQueryTasksResponse.Task.Header (*TaskQueueQueryTasksResponse_Task_CronTimetable)(nil), // 50: appengine.v2.TaskQueueQueryTasksResponse.Task.CronTimetable (*TaskQueueQueryTasksResponse_Task_RunLog)(nil), // 51: appengine.v2.TaskQueueQueryTasksResponse.Task.RunLog (*TaskQueueQueryAndOwnTasksResponse_Task)(nil), // 52: appengine.v2.TaskQueueQueryAndOwnTasksResponse.Task (*datastore.Transaction)(nil), // 53: appengine.v2.Transaction } var file_internal_taskqueue_taskqueue_service_proto_depIdxs = []int32{ 2, // 0: appengine.v2.TaskQueueAddRequest.method:type_name -> appengine.v2.TaskQueueAddRequest.RequestMethod 43, // 1: appengine.v2.TaskQueueAddRequest.header:type_name -> appengine.v2.TaskQueueAddRequest.Header 53, // 2: appengine.v2.TaskQueueAddRequest.transaction:type_name -> appengine.v2.Transaction 44, // 3: appengine.v2.TaskQueueAddRequest.crontimetable:type_name -> appengine.v2.TaskQueueAddRequest.CronTimetable 5, // 4: appengine.v2.TaskQueueAddRequest.payload:type_name -> appengine.v2.TaskPayload 6, // 5: appengine.v2.TaskQueueAddRequest.retry_parameters:type_name -> appengine.v2.TaskQueueRetryParameters 1, // 6: appengine.v2.TaskQueueAddRequest.mode:type_name -> appengine.v2.TaskQueueMode.Mode 10, // 7: appengine.v2.TaskQueueBulkAddRequest.add_request:type_name -> appengine.v2.TaskQueueAddRequest 45, // 8: appengine.v2.TaskQueueBulkAddResponse.taskresult:type_name -> appengine.v2.TaskQueueBulkAddResponse.TaskResult 0, // 9: appengine.v2.TaskQueueDeleteResponse.result:type_name -> appengine.v2.TaskQueueServiceError.ErrorCode 0, // 10: appengine.v2.TaskQueueForceRunResponse.result:type_name -> appengine.v2.TaskQueueServiceError.ErrorCode 6, // 11: appengine.v2.TaskQueueUpdateQueueRequest.retry_parameters:type_name -> appengine.v2.TaskQueueRetryParameters 1, // 12: appengine.v2.TaskQueueUpdateQueueRequest.mode:type_name -> appengine.v2.TaskQueueMode.Mode 7, // 13: appengine.v2.TaskQueueUpdateQueueRequest.acl:type_name -> appengine.v2.TaskQueueAcl 8, // 14: appengine.v2.TaskQueueUpdateQueueRequest.header_override:type_name -> appengine.v2.TaskQueueHttpHeader 46, // 15: appengine.v2.TaskQueueFetchQueuesResponse.queue:type_name -> appengine.v2.TaskQueueFetchQueuesResponse.Queue 47, // 16: appengine.v2.TaskQueueFetchQueueStatsResponse.queuestats:type_name -> appengine.v2.TaskQueueFetchQueueStatsResponse.QueueStats 48, // 17: appengine.v2.TaskQueueQueryTasksResponse.task:type_name -> appengine.v2.TaskQueueQueryTasksResponse.Task 34, // 18: appengine.v2.TaskQueueFetchTaskResponse.task:type_name -> appengine.v2.TaskQueueQueryTasksResponse 52, // 19: appengine.v2.TaskQueueQueryAndOwnTasksResponse.task:type_name -> appengine.v2.TaskQueueQueryAndOwnTasksResponse.Task 0, // 20: appengine.v2.TaskQueueBulkAddResponse.TaskResult.result:type_name -> appengine.v2.TaskQueueServiceError.ErrorCode 6, // 21: appengine.v2.TaskQueueFetchQueuesResponse.Queue.retry_parameters:type_name -> appengine.v2.TaskQueueRetryParameters 1, // 22: appengine.v2.TaskQueueFetchQueuesResponse.Queue.mode:type_name -> appengine.v2.TaskQueueMode.Mode 7, // 23: appengine.v2.TaskQueueFetchQueuesResponse.Queue.acl:type_name -> appengine.v2.TaskQueueAcl 8, // 24: appengine.v2.TaskQueueFetchQueuesResponse.Queue.header_override:type_name -> appengine.v2.TaskQueueHttpHeader 23, // 25: appengine.v2.TaskQueueFetchQueueStatsResponse.QueueStats.scanner_info:type_name -> appengine.v2.TaskQueueScannerQueueInfo 3, // 26: appengine.v2.TaskQueueQueryTasksResponse.Task.method:type_name -> appengine.v2.TaskQueueQueryTasksResponse.Task.RequestMethod 49, // 27: appengine.v2.TaskQueueQueryTasksResponse.Task.header:type_name -> appengine.v2.TaskQueueQueryTasksResponse.Task.Header 50, // 28: appengine.v2.TaskQueueQueryTasksResponse.Task.crontimetable:type_name -> appengine.v2.TaskQueueQueryTasksResponse.Task.CronTimetable 51, // 29: appengine.v2.TaskQueueQueryTasksResponse.Task.runlog:type_name -> appengine.v2.TaskQueueQueryTasksResponse.Task.RunLog 5, // 30: appengine.v2.TaskQueueQueryTasksResponse.Task.payload:type_name -> appengine.v2.TaskPayload 6, // 31: appengine.v2.TaskQueueQueryTasksResponse.Task.retry_parameters:type_name -> appengine.v2.TaskQueueRetryParameters 32, // [32:32] is the sub-list for method output_type 32, // [32:32] is the sub-list for method input_type 32, // [32:32] is the sub-list for extension type_name 32, // [32:32] is the sub-list for extension extendee 0, // [0:32] is the sub-list for field type_name } func init() { file_internal_taskqueue_taskqueue_service_proto_init() } func file_internal_taskqueue_taskqueue_service_proto_init() { if File_internal_taskqueue_taskqueue_service_proto != nil { return } if !protoimpl.UnsafeEnabled { file_internal_taskqueue_taskqueue_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueServiceError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskPayload); 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_internal_taskqueue_taskqueue_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueRetryParameters); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueAcl); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueHttpHeader); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueMode); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueAddRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueAddResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueBulkAddRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueBulkAddResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueDeleteRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueDeleteResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueForceRunRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueForceRunResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueUpdateQueueRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueUpdateQueueResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchQueuesRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchQueuesResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchQueueStatsRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueScannerQueueInfo); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchQueueStatsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueuePauseQueueRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueuePauseQueueResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueuePurgeQueueRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueuePurgeQueueResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueDeleteQueueRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueDeleteQueueResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueDeleteGroupRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueDeleteGroupResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryTasksRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryTasksResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchTaskRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchTaskResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueUpdateStorageLimitRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueUpdateStorageLimitResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryAndOwnTasksRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryAndOwnTasksResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueModifyTaskLeaseRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueModifyTaskLeaseResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueAddRequest_Header); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueAddRequest_CronTimetable); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueBulkAddResponse_TaskResult); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchQueuesResponse_Queue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueFetchQueueStatsResponse_QueueStats); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryTasksResponse_Task); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryTasksResponse_Task_Header); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryTasksResponse_Task_CronTimetable); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryTasksResponse_Task_RunLog); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_taskqueue_taskqueue_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskQueueQueryAndOwnTasksResponse_Task); 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_internal_taskqueue_taskqueue_service_proto_rawDesc, NumEnums: 4, NumMessages: 49, NumExtensions: 0, NumServices: 0, }, GoTypes: file_internal_taskqueue_taskqueue_service_proto_goTypes, DependencyIndexes: file_internal_taskqueue_taskqueue_service_proto_depIdxs, EnumInfos: file_internal_taskqueue_taskqueue_service_proto_enumTypes, MessageInfos: file_internal_taskqueue_taskqueue_service_proto_msgTypes, }.Build() File_internal_taskqueue_taskqueue_service_proto = out.File file_internal_taskqueue_taskqueue_service_proto_rawDesc = nil file_internal_taskqueue_taskqueue_service_proto_goTypes = nil file_internal_taskqueue_taskqueue_service_proto_depIdxs = nil }
taskqueue
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/taskqueue/taskqueue_service.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/taskqueue"; import "internal/datastore/datastore_v3.proto"; package appengine.v2; message TaskQueueServiceError { enum ErrorCode { OK = 0; UNKNOWN_QUEUE = 1; TRANSIENT_ERROR = 2; INTERNAL_ERROR = 3; TASK_TOO_LARGE = 4; INVALID_TASK_NAME = 5; INVALID_QUEUE_NAME = 6; INVALID_URL = 7; INVALID_QUEUE_RATE = 8; PERMISSION_DENIED = 9; TASK_ALREADY_EXISTS = 10; TOMBSTONED_TASK = 11; INVALID_ETA = 12; INVALID_REQUEST = 13; UNKNOWN_TASK = 14; TOMBSTONED_QUEUE = 15; DUPLICATE_TASK_NAME = 16; SKIPPED = 17; TOO_MANY_TASKS = 18; INVALID_PAYLOAD = 19; INVALID_RETRY_PARAMETERS = 20; INVALID_QUEUE_MODE = 21; ACL_LOOKUP_ERROR = 22; TRANSACTIONAL_REQUEST_TOO_LARGE = 23; INCORRECT_CREATOR_NAME = 24; TASK_LEASE_EXPIRED = 25; QUEUE_PAUSED = 26; INVALID_TAG = 27; // Reserved range for the Datastore error codes. // Original Datastore error code is shifted by DATASTORE_ERROR offset. DATASTORE_ERROR = 10000; } } message TaskPayload { extensions 10 to max; option message_set_wire_format = true; } message TaskQueueRetryParameters { optional int32 retry_limit = 1; optional int64 age_limit_sec = 2; optional double min_backoff_sec = 3 [default = 0.1]; optional double max_backoff_sec = 4 [default = 3600]; optional int32 max_doublings = 5 [default = 16]; } message TaskQueueAcl { repeated bytes user_email = 1; repeated bytes writer_email = 2; } message TaskQueueHttpHeader { required bytes key = 1; required bytes value = 2; } message TaskQueueMode { enum Mode { PUSH = 0; PULL = 1; } } message TaskQueueAddRequest { required bytes queue_name = 1; required bytes task_name = 2; required int64 eta_usec = 3; enum RequestMethod { GET = 1; POST = 2; HEAD = 3; PUT = 4; DELETE = 5; } optional RequestMethod method = 5 [default=POST]; optional bytes url = 4; repeated group Header = 6 { required bytes key = 7; required bytes value = 8; } optional bytes body = 9 [ctype=CORD]; optional Transaction transaction = 10; optional bytes app_id = 11; optional group CronTimetable = 12 { required bytes schedule = 13; required bytes timezone = 14; } optional bytes description = 15; optional TaskPayload payload = 16; optional TaskQueueRetryParameters retry_parameters = 17; optional TaskQueueMode.Mode mode = 18 [default=PUSH]; optional bytes tag = 19; } message TaskQueueAddResponse { optional bytes chosen_task_name = 1; } message TaskQueueBulkAddRequest { repeated TaskQueueAddRequest add_request = 1; } message TaskQueueBulkAddResponse { repeated group TaskResult = 1 { required TaskQueueServiceError.ErrorCode result = 2; optional bytes chosen_task_name = 3; } } message TaskQueueDeleteRequest { required bytes queue_name = 1; repeated bytes task_name = 2; optional bytes app_id = 3; } message TaskQueueDeleteResponse { repeated TaskQueueServiceError.ErrorCode result = 3; } message TaskQueueForceRunRequest { optional bytes app_id = 1; required bytes queue_name = 2; required bytes task_name = 3; } message TaskQueueForceRunResponse { required TaskQueueServiceError.ErrorCode result = 3; } message TaskQueueUpdateQueueRequest { optional bytes app_id = 1; required bytes queue_name = 2; required double bucket_refill_per_second = 3; required int32 bucket_capacity = 4; optional string user_specified_rate = 5; optional TaskQueueRetryParameters retry_parameters = 6; optional int32 max_concurrent_requests = 7; optional TaskQueueMode.Mode mode = 8 [default = PUSH]; optional TaskQueueAcl acl = 9; repeated TaskQueueHttpHeader header_override = 10; } message TaskQueueUpdateQueueResponse { } message TaskQueueFetchQueuesRequest { optional bytes app_id = 1; required int32 max_rows = 2; } message TaskQueueFetchQueuesResponse { repeated group Queue = 1 { required bytes queue_name = 2; required double bucket_refill_per_second = 3; required double bucket_capacity = 4; optional string user_specified_rate = 5; required bool paused = 6 [default=false]; optional TaskQueueRetryParameters retry_parameters = 7; optional int32 max_concurrent_requests = 8; optional TaskQueueMode.Mode mode = 9 [default = PUSH]; optional TaskQueueAcl acl = 10; repeated TaskQueueHttpHeader header_override = 11; optional string creator_name = 12 [ctype=CORD, default="apphosting"]; } } message TaskQueueFetchQueueStatsRequest { optional bytes app_id = 1; repeated bytes queue_name = 2; optional int32 max_num_tasks = 3 [default = 0]; } message TaskQueueScannerQueueInfo { required int64 executed_last_minute = 1; required int64 executed_last_hour = 2; required double sampling_duration_seconds = 3; optional int32 requests_in_flight = 4; optional double enforced_rate = 5; } message TaskQueueFetchQueueStatsResponse { repeated group QueueStats = 1 { required int32 num_tasks = 2; required int64 oldest_eta_usec = 3; optional TaskQueueScannerQueueInfo scanner_info = 4; } } message TaskQueuePauseQueueRequest { required bytes app_id = 1; required bytes queue_name = 2; required bool pause = 3; } message TaskQueuePauseQueueResponse { } message TaskQueuePurgeQueueRequest { optional bytes app_id = 1; required bytes queue_name = 2; } message TaskQueuePurgeQueueResponse { } message TaskQueueDeleteQueueRequest { required bytes app_id = 1; required bytes queue_name = 2; } message TaskQueueDeleteQueueResponse { } message TaskQueueDeleteGroupRequest { required bytes app_id = 1; } message TaskQueueDeleteGroupResponse { } message TaskQueueQueryTasksRequest { optional bytes app_id = 1; required bytes queue_name = 2; optional bytes start_task_name = 3; optional int64 start_eta_usec = 4; optional bytes start_tag = 6; optional int32 max_rows = 5 [default = 1]; } message TaskQueueQueryTasksResponse { repeated group Task = 1 { required bytes task_name = 2; required int64 eta_usec = 3; optional bytes url = 4; enum RequestMethod { GET = 1; POST = 2; HEAD = 3; PUT = 4; DELETE = 5; } optional RequestMethod method = 5; optional int32 retry_count = 6 [default=0]; repeated group Header = 7 { required bytes key = 8; required bytes value = 9; } optional int32 body_size = 10; optional bytes body = 11 [ctype=CORD]; required int64 creation_time_usec = 12; optional group CronTimetable = 13 { required bytes schedule = 14; required bytes timezone = 15; } optional group RunLog = 16 { required int64 dispatched_usec = 17; required int64 lag_usec = 18; required int64 elapsed_usec = 19; optional int64 response_code = 20; optional string retry_reason = 27; } optional bytes description = 21; optional TaskPayload payload = 22; optional TaskQueueRetryParameters retry_parameters = 23; optional int64 first_try_usec = 24; optional bytes tag = 25; optional int32 execution_count = 26 [default=0]; } } message TaskQueueFetchTaskRequest { optional bytes app_id = 1; required bytes queue_name = 2; required bytes task_name = 3; } message TaskQueueFetchTaskResponse { required TaskQueueQueryTasksResponse task = 1; } message TaskQueueUpdateStorageLimitRequest { required bytes app_id = 1; required int64 limit = 2; } message TaskQueueUpdateStorageLimitResponse { required int64 new_limit = 1; } message TaskQueueQueryAndOwnTasksRequest { required bytes queue_name = 1; required double lease_seconds = 2; required int64 max_tasks = 3; optional bool group_by_tag = 4 [default=false]; optional bytes tag = 5; } message TaskQueueQueryAndOwnTasksResponse { repeated group Task = 1 { required bytes task_name = 2; required int64 eta_usec = 3; optional int32 retry_count = 4 [default=0]; optional bytes body = 5 [ctype=CORD]; optional bytes tag = 6; } } message TaskQueueModifyTaskLeaseRequest { required bytes queue_name = 1; required bytes task_name = 2; required int64 eta_usec = 3; required double lease_seconds = 4; } message TaskQueueModifyTaskLeaseResponse { required int64 updated_eta_usec = 1; }
remote_api
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/remote_api/remote_api.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: remote_api.proto package remote_api import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type 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 ) // Enum value maps for RpcError_ErrorCode. 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", } 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 protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (RpcError_ErrorCode) Descriptor() protoreflect.EnumDescriptor { return file_remote_api_proto_enumTypes[0].Descriptor() } func (RpcError_ErrorCode) Type() protoreflect.EnumType { return &file_remote_api_proto_enumTypes[0] } func (x RpcError_ErrorCode) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *RpcError_ErrorCode) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = RpcError_ErrorCode(num) return nil } // Deprecated: Use RpcError_ErrorCode.Descriptor instead. func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { return file_remote_api_proto_rawDescGZIP(), []int{2, 0} } type Request struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *Request) Reset() { *x = Request{} if protoimpl.UnsafeEnabled { mi := &file_remote_api_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Request) String() string { return protoimpl.X.MessageStringOf(x) } func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_remote_api_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 Request.ProtoReflect.Descriptor instead. func (*Request) Descriptor() ([]byte, []int) { return file_remote_api_proto_rawDescGZIP(), []int{0} } func (x *Request) GetServiceName() string { if x != nil && x.ServiceName != nil { return *x.ServiceName } return "" } func (x *Request) GetMethod() string { if x != nil && x.Method != nil { return *x.Method } return "" } func (x *Request) GetRequest() []byte { if x != nil { return x.Request } return nil } func (x *Request) GetRequestId() string { if x != nil && x.RequestId != nil { return *x.RequestId } return "" } type ApplicationError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"` } func (x *ApplicationError) Reset() { *x = ApplicationError{} if protoimpl.UnsafeEnabled { mi := &file_remote_api_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ApplicationError) String() string { return protoimpl.X.MessageStringOf(x) } func (*ApplicationError) ProtoMessage() {} func (x *ApplicationError) ProtoReflect() protoreflect.Message { mi := &file_remote_api_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 ApplicationError.ProtoReflect.Descriptor instead. func (*ApplicationError) Descriptor() ([]byte, []int) { return file_remote_api_proto_rawDescGZIP(), []int{1} } func (x *ApplicationError) GetCode() int32 { if x != nil && x.Code != nil { return *x.Code } return 0 } func (x *ApplicationError) GetDetail() string { if x != nil && x.Detail != nil { return *x.Detail } return "" } type RpcError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"` } func (x *RpcError) Reset() { *x = RpcError{} if protoimpl.UnsafeEnabled { mi := &file_remote_api_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RpcError) String() string { return protoimpl.X.MessageStringOf(x) } func (*RpcError) ProtoMessage() {} func (x *RpcError) ProtoReflect() protoreflect.Message { mi := &file_remote_api_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 RpcError.ProtoReflect.Descriptor instead. func (*RpcError) Descriptor() ([]byte, []int) { return file_remote_api_proto_rawDescGZIP(), []int{2} } func (x *RpcError) GetCode() int32 { if x != nil && x.Code != nil { return *x.Code } return 0 } func (x *RpcError) GetDetail() string { if x != nil && x.Detail != nil { return *x.Detail } return "" } type Response struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields 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"` } func (x *Response) Reset() { *x = Response{} if protoimpl.UnsafeEnabled { mi := &file_remote_api_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Response) String() string { return protoimpl.X.MessageStringOf(x) } func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_remote_api_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 Response.ProtoReflect.Descriptor instead. func (*Response) Descriptor() ([]byte, []int) { return file_remote_api_proto_rawDescGZIP(), []int{3} } func (x *Response) GetResponse() []byte { if x != nil { return x.Response } return nil } func (x *Response) GetException() []byte { if x != nil { return x.Exception } return nil } func (x *Response) GetApplicationError() *ApplicationError { if x != nil { return x.ApplicationError } return nil } func (x *Response) GetJavaException() []byte { if x != nil { return x.JavaException } return nil } func (x *Response) GetRpcError() *RpcError { if x != nil { return x.RpcError } return nil } var File_remote_api_proto protoreflect.FileDescriptor var file_remote_api_proto_rawDesc = []byte{ 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x22, 0x7d, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0xc5, 0x02, 0x0a, 0x08, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x8c, 0x02, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x41, 0x4c, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x52, 0x53, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x56, 0x49, 0x4f, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x51, 0x55, 0x4f, 0x54, 0x41, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x41, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x0c, 0x22, 0xef, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6a, 0x61, 0x76, 0x61, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x08, 0x72, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x70, 0x69, } var ( file_remote_api_proto_rawDescOnce sync.Once file_remote_api_proto_rawDescData = file_remote_api_proto_rawDesc ) func file_remote_api_proto_rawDescGZIP() []byte { file_remote_api_proto_rawDescOnce.Do(func() { file_remote_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_remote_api_proto_rawDescData) }) return file_remote_api_proto_rawDescData } var file_remote_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_remote_api_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_remote_api_proto_goTypes = []interface{}{ (RpcError_ErrorCode)(0), // 0: remote_api.v2.RpcError.ErrorCode (*Request)(nil), // 1: remote_api.v2.Request (*ApplicationError)(nil), // 2: remote_api.v2.ApplicationError (*RpcError)(nil), // 3: remote_api.v2.RpcError (*Response)(nil), // 4: remote_api.v2.Response } var file_remote_api_proto_depIdxs = []int32{ 2, // 0: remote_api.v2.Response.application_error:type_name -> remote_api.v2.ApplicationError 3, // 1: remote_api.v2.Response.rpc_error:type_name -> remote_api.v2.RpcError 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_remote_api_proto_init() } func file_remote_api_proto_init() { if File_remote_api_proto != nil { return } if !protoimpl.UnsafeEnabled { file_remote_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Request); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_remote_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ApplicationError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_remote_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RpcError); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_remote_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Response); 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_remote_api_proto_rawDesc, NumEnums: 1, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_remote_api_proto_goTypes, DependencyIndexes: file_remote_api_proto_depIdxs, EnumInfos: file_remote_api_proto_enumTypes, MessageInfos: file_remote_api_proto_msgTypes, }.Build() File_remote_api_proto = out.File file_remote_api_proto_rawDesc = nil file_remote_api_proto_goTypes = nil file_remote_api_proto_depIdxs = nil }
remote_api
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/remote_api/remote_api.proto
syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/remote_api"; package remote_api.v2; 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; }
aetesting
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/aetesting/fake.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 aetesting provides utilities for testing App Engine packages. // This is not for testing user applications. package aetesting import ( "context" "fmt" "net/http" "reflect" "testing" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" ) // FakeSingleContext returns a context whose Call invocations will be serviced // by f, which should be a function that has two arguments of the input and output // protocol buffer type, and one error return. func FakeSingleContext(t *testing.T, service, method string, f interface{}) context.Context { fv := reflect.ValueOf(f) if fv.Kind() != reflect.Func { t.Fatal("not a function") } ft := fv.Type() if ft.NumIn() != 2 || ft.NumOut() != 1 { t.Fatalf("f has %d in and %d out, want 2 in and 1 out", ft.NumIn(), ft.NumOut()) } for i := 0; i < 2; i++ { at := ft.In(i) if !at.Implements(protoMessageType) { t.Fatalf("arg %d does not implement proto.Message", i) } } if ft.Out(0) != errorType { t.Fatalf("f's return is %v, want error", ft.Out(0)) } s := &single{ t: t, service: service, method: method, f: fv, } return internal.WithCallOverride(internal.ContextForTesting(&http.Request{}), s.call) } var ( protoMessageType = reflect.TypeOf((*proto.Message)(nil)).Elem() errorType = reflect.TypeOf((*error)(nil)).Elem() ) type single struct { t *testing.T service, method string f reflect.Value } func (s *single) call(ctx context.Context, service, method string, in, out proto.Message) error { if service == "__go__" { if method == "GetNamespace" { return nil // always yield an empty namespace } return fmt.Errorf("Unknown API call /%s.%s", service, method) } if service != s.service || method != s.method { s.t.Fatalf("Unexpected call to /%s.%s", service, method) } ins := []reflect.Value{ reflect.ValueOf(in), reflect.ValueOf(out), } outs := s.f.Call(ins) if outs[0].IsNil() { return nil } return outs[0].Interface().(error) }
base
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/base/api_base.pb.go
// Built-in base types for API calls. Primarily useful as return types. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 // source: api_base.proto package base import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type StringProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` } func (x *StringProto) Reset() { *x = StringProto{} if protoimpl.UnsafeEnabled { mi := &file_api_base_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StringProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*StringProto) ProtoMessage() {} func (x *StringProto) ProtoReflect() protoreflect.Message { mi := &file_api_base_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 StringProto.ProtoReflect.Descriptor instead. func (*StringProto) Descriptor() ([]byte, []int) { return file_api_base_proto_rawDescGZIP(), []int{0} } func (x *StringProto) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } type Integer32Proto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` } func (x *Integer32Proto) Reset() { *x = Integer32Proto{} if protoimpl.UnsafeEnabled { mi := &file_api_base_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Integer32Proto) String() string { return protoimpl.X.MessageStringOf(x) } func (*Integer32Proto) ProtoMessage() {} func (x *Integer32Proto) ProtoReflect() protoreflect.Message { mi := &file_api_base_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 Integer32Proto.ProtoReflect.Descriptor instead. func (*Integer32Proto) Descriptor() ([]byte, []int) { return file_api_base_proto_rawDescGZIP(), []int{1} } func (x *Integer32Proto) GetValue() int32 { if x != nil && x.Value != nil { return *x.Value } return 0 } type Integer64Proto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` } func (x *Integer64Proto) Reset() { *x = Integer64Proto{} if protoimpl.UnsafeEnabled { mi := &file_api_base_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Integer64Proto) String() string { return protoimpl.X.MessageStringOf(x) } func (*Integer64Proto) ProtoMessage() {} func (x *Integer64Proto) ProtoReflect() protoreflect.Message { mi := &file_api_base_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 Integer64Proto.ProtoReflect.Descriptor instead. func (*Integer64Proto) Descriptor() ([]byte, []int) { return file_api_base_proto_rawDescGZIP(), []int{2} } func (x *Integer64Proto) GetValue() int64 { if x != nil && x.Value != nil { return *x.Value } return 0 } type BoolProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` } func (x *BoolProto) Reset() { *x = BoolProto{} if protoimpl.UnsafeEnabled { mi := &file_api_base_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *BoolProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*BoolProto) ProtoMessage() {} func (x *BoolProto) ProtoReflect() protoreflect.Message { mi := &file_api_base_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 BoolProto.ProtoReflect.Descriptor instead. func (*BoolProto) Descriptor() ([]byte, []int) { return file_api_base_proto_rawDescGZIP(), []int{3} } func (x *BoolProto) GetValue() bool { if x != nil && x.Value != nil { return *x.Value } return false } type DoubleProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"` } func (x *DoubleProto) Reset() { *x = DoubleProto{} if protoimpl.UnsafeEnabled { mi := &file_api_base_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DoubleProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*DoubleProto) ProtoMessage() {} func (x *DoubleProto) ProtoReflect() protoreflect.Message { mi := &file_api_base_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 DoubleProto.ProtoReflect.Descriptor instead. func (*DoubleProto) Descriptor() ([]byte, []int) { return file_api_base_proto_rawDescGZIP(), []int{4} } func (x *DoubleProto) GetValue() float64 { if x != nil && x.Value != nil { return *x.Value } return 0 } type BytesProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` } func (x *BytesProto) Reset() { *x = BytesProto{} if protoimpl.UnsafeEnabled { mi := &file_api_base_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *BytesProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*BytesProto) ProtoMessage() {} func (x *BytesProto) ProtoReflect() protoreflect.Message { mi := &file_api_base_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 BytesProto.ProtoReflect.Descriptor instead. func (*BytesProto) Descriptor() ([]byte, []int) { return file_api_base_proto_rawDescGZIP(), []int{5} } func (x *BytesProto) GetValue() []byte { if x != nil { return x.Value } return nil } type VoidProto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *VoidProto) Reset() { *x = VoidProto{} if protoimpl.UnsafeEnabled { mi := &file_api_base_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *VoidProto) String() string { return protoimpl.X.MessageStringOf(x) } func (*VoidProto) ProtoMessage() {} func (x *VoidProto) ProtoReflect() protoreflect.Message { mi := &file_api_base_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 VoidProto.ProtoReflect.Descriptor instead. func (*VoidProto) Descriptor() ([]byte, []int) { return file_api_base_proto_rawDescGZIP(), []int{6} } var File_api_base_proto protoreflect.FileDescriptor var file_api_base_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x32, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x33, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x36, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x42, 0x02, 0x08, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x56, 0x6f, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x61, 0x73, 0x65, } var ( file_api_base_proto_rawDescOnce sync.Once file_api_base_proto_rawDescData = file_api_base_proto_rawDesc ) func file_api_base_proto_rawDescGZIP() []byte { file_api_base_proto_rawDescOnce.Do(func() { file_api_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_base_proto_rawDescData) }) return file_api_base_proto_rawDescData } var file_api_base_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_api_base_proto_goTypes = []interface{}{ (*StringProto)(nil), // 0: appengine.base.v2.StringProto (*Integer32Proto)(nil), // 1: appengine.base.v2.Integer32Proto (*Integer64Proto)(nil), // 2: appengine.base.v2.Integer64Proto (*BoolProto)(nil), // 3: appengine.base.v2.BoolProto (*DoubleProto)(nil), // 4: appengine.base.v2.DoubleProto (*BytesProto)(nil), // 5: appengine.base.v2.BytesProto (*VoidProto)(nil), // 6: appengine.base.v2.VoidProto } var file_api_base_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_api_base_proto_init() } func file_api_base_proto_init() { if File_api_base_proto != nil { return } if !protoimpl.UnsafeEnabled { file_api_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StringProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_api_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Integer32Proto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_api_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Integer64Proto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_api_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BoolProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_api_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DoubleProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_api_base_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BytesProto); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_api_base_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VoidProto); 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_api_base_proto_rawDesc, NumEnums: 0, NumMessages: 7, NumExtensions: 0, NumServices: 0, }, GoTypes: file_api_base_proto_goTypes, DependencyIndexes: file_api_base_proto_depIdxs, MessageInfos: file_api_base_proto_msgTypes, }.Build() File_api_base_proto = out.File file_api_base_proto_rawDesc = nil file_api_base_proto_goTypes = nil file_api_base_proto_depIdxs = nil }
base
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/internal/base/api_base.proto
// Built-in base types for API calls. Primarily useful as return types. syntax = "proto2"; option go_package = "google.golang.org/appengine/v2/internal/base"; package appengine.base.v2; 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 { }
memcache
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/memcache/memcache_test.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 memcache import ( "fmt" "testing" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal/aetesting" pb "google.golang.org/appengine/v2/internal/memcache" ) var errRPC = fmt.Errorf("RPC error") func TestGetRequest(t *testing.T) { serviceCalled := false apiKey := "lyric" c := aetesting.FakeSingleContext(t, "memcache", "Get", func(req *pb.MemcacheGetRequest, _ *pb.MemcacheGetResponse) error { // Test request. if n := len(req.Key); n != 1 { t.Errorf("got %d want 1", n) return nil } if k := string(req.Key[0]); k != apiKey { t.Errorf("got %q want %q", k, apiKey) } serviceCalled = true return nil }) // Test the "forward" path from the API call parameters to the // protobuf request object. (The "backward" path from the // protobuf response object to the API call response, // including the error response, are handled in the next few // tests). Get(c, apiKey) if !serviceCalled { t.Error("Service was not called as expected") } } func TestGetResponseHit(t *testing.T) { key := "lyric" value := "Where the buffalo roam" c := aetesting.FakeSingleContext(t, "memcache", "Get", func(_ *pb.MemcacheGetRequest, res *pb.MemcacheGetResponse) error { res.Item = []*pb.MemcacheGetResponse_Item{ {Key: []byte(key), Value: []byte(value)}, } return nil }) apiItem, err := Get(c, key) if apiItem == nil || apiItem.Key != key || string(apiItem.Value) != value { t.Errorf("got %q, %q want {%q,%q}, nil", apiItem, err, key, value) } } func TestGetResponseMiss(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Get", func(_ *pb.MemcacheGetRequest, res *pb.MemcacheGetResponse) error { // don't fill in any of the response return nil }) _, err := Get(c, "something") if err != ErrCacheMiss { t.Errorf("got %v want ErrCacheMiss", err) } } func TestGetResponseRPCError(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Get", func(_ *pb.MemcacheGetRequest, res *pb.MemcacheGetResponse) error { return errRPC }) if _, err := Get(c, "something"); err != errRPC { t.Errorf("got %v want errRPC", err) } } func TestAddRequest(t *testing.T) { var apiItem = &Item{ Key: "lyric", Value: []byte("Oh, give me a home"), } serviceCalled := false c := aetesting.FakeSingleContext(t, "memcache", "Set", func(req *pb.MemcacheSetRequest, _ *pb.MemcacheSetResponse) error { // Test request. pbItem := req.Item[0] if k := string(pbItem.Key); k != apiItem.Key { t.Errorf("got %q want %q", k, apiItem.Key) } if v := string(apiItem.Value); v != string(pbItem.Value) { t.Errorf("got %q want %q", v, string(pbItem.Value)) } if p := *pbItem.SetPolicy; p != pb.MemcacheSetRequest_ADD { t.Errorf("got %v want %v", p, pb.MemcacheSetRequest_ADD) } serviceCalled = true return nil }) Add(c, apiItem) if !serviceCalled { t.Error("Service was not called as expected") } } func TestAddResponseStored(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Set", func(_ *pb.MemcacheSetRequest, res *pb.MemcacheSetResponse) error { res.SetStatus = []pb.MemcacheSetResponse_SetStatusCode{pb.MemcacheSetResponse_STORED} return nil }) if err := Add(c, &Item{}); err != nil { t.Errorf("got %v want nil", err) } } func TestAddResponseNotStored(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Set", func(_ *pb.MemcacheSetRequest, res *pb.MemcacheSetResponse) error { res.SetStatus = []pb.MemcacheSetResponse_SetStatusCode{pb.MemcacheSetResponse_NOT_STORED} return nil }) if err := Add(c, &Item{}); err != ErrNotStored { t.Errorf("got %v want ErrNotStored", err) } } func TestAddResponseError(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Set", func(_ *pb.MemcacheSetRequest, res *pb.MemcacheSetResponse) error { res.SetStatus = []pb.MemcacheSetResponse_SetStatusCode{pb.MemcacheSetResponse_ERROR} return nil }) if err := Add(c, &Item{}); err != ErrServerError { t.Errorf("got %v want ErrServerError", err) } } func TestAddResponseRPCError(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Set", func(_ *pb.MemcacheSetRequest, res *pb.MemcacheSetResponse) error { return errRPC }) if err := Add(c, &Item{}); err != errRPC { t.Errorf("got %v want errRPC", err) } } func TestSetRequest(t *testing.T) { var apiItem = &Item{ Key: "lyric", Value: []byte("Where the buffalo roam"), } serviceCalled := false c := aetesting.FakeSingleContext(t, "memcache", "Set", func(req *pb.MemcacheSetRequest, _ *pb.MemcacheSetResponse) error { // Test request. if n := len(req.Item); n != 1 { t.Errorf("got %d want 1", n) return nil } pbItem := req.Item[0] if k := string(pbItem.Key); k != apiItem.Key { t.Errorf("got %q want %q", k, apiItem.Key) } if v := string(pbItem.Value); v != string(apiItem.Value) { t.Errorf("got %q want %q", v, string(apiItem.Value)) } if p := *pbItem.SetPolicy; p != pb.MemcacheSetRequest_SET { t.Errorf("got %v want %v", p, pb.MemcacheSetRequest_SET) } serviceCalled = true return nil }) Set(c, apiItem) if !serviceCalled { t.Error("Service was not called as expected") } } func TestSetResponse(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Set", func(_ *pb.MemcacheSetRequest, res *pb.MemcacheSetResponse) error { res.SetStatus = []pb.MemcacheSetResponse_SetStatusCode{pb.MemcacheSetResponse_STORED} return nil }) if err := Set(c, &Item{}); err != nil { t.Errorf("got %v want nil", err) } } func TestSetResponseError(t *testing.T) { c := aetesting.FakeSingleContext(t, "memcache", "Set", func(_ *pb.MemcacheSetRequest, res *pb.MemcacheSetResponse) error { res.SetStatus = []pb.MemcacheSetResponse_SetStatusCode{pb.MemcacheSetResponse_ERROR} return nil }) if err := Set(c, &Item{}); err != ErrServerError { t.Errorf("got %v want ErrServerError", err) } } func TestNamespaceResetting(t *testing.T) { namec := make(chan *string, 1) c0 := aetesting.FakeSingleContext(t, "memcache", "Get", func(req *pb.MemcacheGetRequest, res *pb.MemcacheGetResponse) error { namec <- req.NameSpace return errRPC }) // Check that wrapping c0 in a namespace twice works correctly. c1, err := appengine.Namespace(c0, "A") if err != nil { t.Fatalf("appengine.Namespace: %v", err) } c2, err := appengine.Namespace(c1, "") // should act as the original context if err != nil { t.Fatalf("appengine.Namespace: %v", err) } Get(c0, "key") if ns := <-namec; ns != nil { t.Errorf(`Get with c0: ns = %q, want nil`, *ns) } Get(c1, "key") if ns := <-namec; ns == nil { t.Error(`Get with c1: ns = nil, want "A"`) } else if *ns != "A" { t.Errorf(`Get with c1: ns = %q, want "A"`, *ns) } Get(c2, "key") if ns := <-namec; ns != nil { t.Errorf(`Get with c2: ns = %q, want nil`, *ns) } } func TestGetMultiEmpty(t *testing.T) { serviceCalled := false c := aetesting.FakeSingleContext(t, "memcache", "Get", func(req *pb.MemcacheGetRequest, _ *pb.MemcacheGetResponse) error { serviceCalled = true return nil }) // Test that the Memcache service is not called when // GetMulti is passed an empty slice of keys. GetMulti(c, []string{}) if serviceCalled { t.Error("Service was called but should not have been") } } func TestPeekRequest(t *testing.T) { serviceCalled := false key := "lyric" value := "Where the buffalo roam" t1, t2 := int64(1690570000), int64(1690564666) c := aetesting.FakeSingleContext(t, "memcache", "Get", func(req *pb.MemcacheGetRequest, res *pb.MemcacheGetResponse) error { // Test request. if n := len(req.Key); n != 1 { t.Errorf("got %d want 1", n) return nil } if k := string(req.Key[0]); k != key { t.Errorf("got %q want %q", k, key) } // Response res.Item = []*pb.MemcacheGetResponse_Item{ { Key: []byte(key), Value: []byte(value), Timestamps: &pb.ItemTimestamps{ ExpirationTimeSec: &t1, LastAccessTimeSec: &t2, }, }, } serviceCalled = true return nil }) item, err := Peek(c, key) if !serviceCalled { t.Error("Service was not called as expected") } if err != nil { t.Errorf("got %v want nil", err) } if item == nil || item.Key != key || string(item.Value) != value { t.Errorf("got %q, %q want {%q,%q}, nil", item, err, key, value) } if item.Timestamps.Expiration.Unix() != t1 { t.Errorf("got %d, want %d", item.Timestamps.Expiration.Unix(), t1) } if item.Timestamps.LastAccess.Unix() != t2 { t.Errorf("got %d, want %d", item.Timestamps.LastAccess.Unix(), t2) } }
memcache
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/memcache/memcache.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 memcache provides a client for App Engine's distributed in-memory // key-value store for small chunks of arbitrary data. // // The fundamental operations get and set items, keyed by a string. // // item0, err := memcache.Get(c, "key") // if err != nil && err != memcache.ErrCacheMiss { // return err // } // if err == nil { // fmt.Fprintf(w, "memcache hit: Key=%q Val=[% x]\n", item0.Key, item0.Value) // } else { // fmt.Fprintf(w, "memcache miss\n") // } // // and // // item1 := &memcache.Item{ // Key: "foo", // Value: []byte("bar"), // } // if err := memcache.Set(c, item1); err != nil { // return err // } package memcache // import "google.golang.org/appengine/v2/memcache" import ( "bytes" "context" "encoding/gob" "encoding/json" "errors" "time" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/memcache" ) var ( // ErrCacheMiss means that an operation failed // because the item wasn't present. ErrCacheMiss = errors.New("memcache: cache miss") // ErrCASConflict means that a CompareAndSwap call failed due to the // cached value being modified between the Get and the CompareAndSwap. // If the cached value was simply evicted rather than replaced, // ErrNotStored will be returned instead. ErrCASConflict = errors.New("memcache: compare-and-swap conflict") // ErrNoStats means that no statistics were available. ErrNoStats = errors.New("memcache: no statistics available") // ErrNotStored means that a conditional write operation (i.e. Add or // CompareAndSwap) failed because the condition was not satisfied. ErrNotStored = errors.New("memcache: item not stored") // ErrServerError means that a server error occurred. ErrServerError = errors.New("memcache: server error") ) // Item is the unit of memcache gets and sets. type Item struct { // Key is the Item's key (250 bytes maximum). Key string // Value is the Item's value. Value []byte // Object is the Item's value for use with a Codec. Object interface{} // Flags are server-opaque flags whose semantics are entirely up to the // App Engine app. Flags uint32 // Expiration is the maximum duration that the item will stay // in the cache. // The zero value means the Item has no expiration time. // Subsecond precision is ignored. // This is not set when getting items. Expiration time.Duration // casID is a client-opaque value used for compare-and-swap operations. // Zero means that compare-and-swap is not used. casID uint64 // ItemTimestamps are server values only returned when calling Peek and PeekMulti. // The timestamps are nil when calling Get and GetMulti. Timestamps ItemTimestamps } // ItemTimestamps are timestamps optionally provided by the server. // See Peek and PeekMulti. type ItemTimestamps struct { // Expiration is related to Item.Expiration but it is a Time (not a Duration), // provided by the server. It is not meant to be set by the user. Expiration *time.Time // LastAccess is the last time the Item was accessed. LastAccess *time.Time // The proto also includes delete_lock_time_sec, which is ignored in the Go lib. } const ( secondsIn30Years = 60 * 60 * 24 * 365 * 30 // from memcache server code thirtyYears = time.Duration(secondsIn30Years) * time.Second ) // protoToItem converts a protocol buffer item to a Go struct. func protoToItem(p *pb.MemcacheGetResponse_Item) *Item { if p.GetIsDeleteLocked() { // "delete lock" for a duration is not a feature available in the Go lib. // Such items may exist in memcache though, e.g. created by the Java lib. // In this case, nil is more appropriate than an item with empty value. // For a single Get, nil will translate to ErrCacheMiss. return nil } return &Item{ Key: string(p.Key), Value: p.Value, Flags: p.GetFlags(), casID: p.GetCasId(), Timestamps: ItemTimestamps{ Expiration: timeSecToTime(p.GetTimestamps().GetExpirationTimeSec()), LastAccess: timeSecToTime(p.GetTimestamps().GetLastAccessTimeSec()), }, } } // For convenience, we interpret a 0 unix second timestamp as a nil *Time. func timeSecToTime(s int64) *time.Time { if s == 0 { return nil } t := time.Unix(s, 0) return &t } // If err is an appengine.MultiError, return its first element. Otherwise, return err. func singleError(err error) error { if me, ok := err.(appengine.MultiError); ok { return me[0] } return err } // Get gets the item for the given key. ErrCacheMiss is returned for a memcache // cache miss. The key must be at most 250 bytes in length. func Get(c context.Context, key string) (*Item, error) { cas, peek := true, false return get(c, key, cas, peek) } // GetMulti is a batch version of Get. The returned map from keys to items may // have fewer elements than the input slice, due to memcache cache misses. // Each key must be at most 250 bytes in length. func GetMulti(c context.Context, key []string) (map[string]*Item, error) { cas, peek := true, false return getMulti(c, key, cas, peek) } // Peek gets the item for the given key and additionally populates Item.Timestamps. // ErrCacheMiss is returned for a memcache cache miss. The key must be at most 250 // bytes in length. func Peek(c context.Context, key string) (*Item, error) { cas, peek := true, true return get(c, key, cas, peek) } // PeekMulti is a batch version of Peek. It is similar to GetMulti but // additionally populates Item.Timestamps. func PeekMulti(c context.Context, key []string) (map[string]*Item, error) { cas, peek := true, true return getMulti(c, key, cas, peek) } func get(c context.Context, key string, forCas bool, forPeek bool) (*Item, error) { m, err := getMulti(c, []string{key}, forCas, forPeek) if err != nil { return nil, err } if _, ok := m[key]; !ok { return nil, ErrCacheMiss } return m[key], nil } func getMulti(c context.Context, key []string, forCas bool, forPeek bool) (map[string]*Item, error) { if len(key) == 0 { return nil, nil } keyAsBytes := make([][]byte, len(key)) for i, k := range key { keyAsBytes[i] = []byte(k) } req := &pb.MemcacheGetRequest{ Key: keyAsBytes, ForCas: proto.Bool(forCas), ForPeek: proto.Bool(forPeek), } res := &pb.MemcacheGetResponse{} if err := internal.Call(c, "memcache", "Get", req, res); err != nil { return nil, err } m := make(map[string]*Item, len(res.Item)) for _, p := range res.Item { t := protoToItem(p) if t != nil { m[t.Key] = t } } return m, nil } // Delete deletes the item for the given key. // ErrCacheMiss is returned if the specified item can not be found. // The key must be at most 250 bytes in length. func Delete(c context.Context, key string) error { return singleError(DeleteMulti(c, []string{key})) } // DeleteMulti is a batch version of Delete. // If any keys cannot be found, an appengine.MultiError is returned. // Each key must be at most 250 bytes in length. func DeleteMulti(c context.Context, key []string) error { if len(key) == 0 { return nil } req := &pb.MemcacheDeleteRequest{ Item: make([]*pb.MemcacheDeleteRequest_Item, len(key)), } for i, k := range key { req.Item[i] = &pb.MemcacheDeleteRequest_Item{Key: []byte(k)} } res := &pb.MemcacheDeleteResponse{} if err := internal.Call(c, "memcache", "Delete", req, res); err != nil { return err } if len(res.DeleteStatus) != len(key) { return ErrServerError } me, any := make(appengine.MultiError, len(key)), false for i, s := range res.DeleteStatus { switch s { case pb.MemcacheDeleteResponse_DELETED: // OK case pb.MemcacheDeleteResponse_NOT_FOUND: me[i] = ErrCacheMiss any = true default: me[i] = ErrServerError any = true } } if any { return me } return nil } // Increment atomically increments the decimal value in the given key // by delta and returns the new value. The value must fit in a uint64. // Overflow wraps around, and underflow is capped to zero. The // provided delta may be negative. If the key doesn't exist in // memcache, the provided initial value is used to atomically // populate it before the delta is applied. // The key must be at most 250 bytes in length. func Increment(c context.Context, key string, delta int64, initialValue uint64) (newValue uint64, err error) { return incr(c, key, delta, &initialValue) } // IncrementExisting works like Increment but assumes that the key // already exists in memcache and doesn't take an initial value. // IncrementExisting can save work if calculating the initial value is // expensive. // An error is returned if the specified item can not be found. func IncrementExisting(c context.Context, key string, delta int64) (newValue uint64, err error) { return incr(c, key, delta, nil) } func incr(c context.Context, key string, delta int64, initialValue *uint64) (newValue uint64, err error) { req := &pb.MemcacheIncrementRequest{ Key: []byte(key), InitialValue: initialValue, } if delta >= 0 { req.Delta = proto.Uint64(uint64(delta)) } else { req.Delta = proto.Uint64(uint64(-delta)) req.Direction = pb.MemcacheIncrementRequest_DECREMENT.Enum() } res := &pb.MemcacheIncrementResponse{} err = internal.Call(c, "memcache", "Increment", req, res) if err != nil { return } if res.NewValue == nil { return 0, ErrCacheMiss } return *res.NewValue, nil } // set sets the given items using the given conflict resolution policy. // appengine.MultiError may be returned. func set(c context.Context, item []*Item, value [][]byte, policy pb.MemcacheSetRequest_SetPolicy) error { if len(item) == 0 { return nil } req := &pb.MemcacheSetRequest{ Item: make([]*pb.MemcacheSetRequest_Item, len(item)), } for i, t := range item { p := &pb.MemcacheSetRequest_Item{ Key: []byte(t.Key), } if value == nil { p.Value = t.Value } else { p.Value = value[i] } if t.Flags != 0 { p.Flags = proto.Uint32(t.Flags) } if t.Expiration != 0 { // In the .proto file, MemcacheSetRequest_Item uses a fixed32 (i.e. unsigned) // for expiration time, while MemcacheGetRequest_Item uses int32 (i.e. signed). // Throughout this .go file, we use int32. // Also, in the proto, the expiration value is either a duration (in seconds) // or an absolute Unix timestamp (in seconds), depending on whether the // value is less than or greater than or equal to 30 years, respectively. if t.Expiration < time.Second { // Because an Expiration of 0 means no expiration, we take // care here to translate an item with an expiration // Duration between 0-1 seconds as immediately expiring // (saying it expired a few seconds ago), rather than // rounding it down to 0 and making it live forever. p.ExpirationTime = proto.Uint32(uint32(time.Now().Unix()) - 5) } else if t.Expiration >= thirtyYears { p.ExpirationTime = proto.Uint32(uint32(time.Now().Unix()) + uint32(t.Expiration/time.Second)) } else { p.ExpirationTime = proto.Uint32(uint32(t.Expiration / time.Second)) } } if t.casID != 0 { p.CasId = proto.Uint64(t.casID) p.ForCas = proto.Bool(true) } p.SetPolicy = policy.Enum() req.Item[i] = p } res := &pb.MemcacheSetResponse{} if err := internal.Call(c, "memcache", "Set", req, res); err != nil { return err } if len(res.SetStatus) != len(item) { return ErrServerError } me, any := make(appengine.MultiError, len(item)), false for i, st := range res.SetStatus { var err error switch st { case pb.MemcacheSetResponse_STORED: // OK case pb.MemcacheSetResponse_NOT_STORED: err = ErrNotStored case pb.MemcacheSetResponse_EXISTS: err = ErrCASConflict default: err = ErrServerError } if err != nil { me[i] = err any = true } } if any { return me } return nil } // Set writes the given item, unconditionally. func Set(c context.Context, item *Item) error { return singleError(set(c, []*Item{item}, nil, pb.MemcacheSetRequest_SET)) } // SetMulti is a batch version of Set. // appengine.MultiError may be returned. func SetMulti(c context.Context, item []*Item) error { return set(c, item, nil, pb.MemcacheSetRequest_SET) } // Add writes the given item, if no value already exists for its key. // ErrNotStored is returned if that condition is not met. func Add(c context.Context, item *Item) error { return singleError(set(c, []*Item{item}, nil, pb.MemcacheSetRequest_ADD)) } // AddMulti is a batch version of Add. // appengine.MultiError may be returned. func AddMulti(c context.Context, item []*Item) error { return set(c, item, nil, pb.MemcacheSetRequest_ADD) } // CompareAndSwap writes the given item that was previously returned by Get, // if the value was neither modified or evicted between the Get and the // CompareAndSwap calls. The item's Key should not change between calls but // all other item fields may differ. // ErrCASConflict is returned if the value was modified in between the calls. // ErrNotStored is returned if the value was evicted in between the calls. func CompareAndSwap(c context.Context, item *Item) error { return singleError(set(c, []*Item{item}, nil, pb.MemcacheSetRequest_CAS)) } // CompareAndSwapMulti is a batch version of CompareAndSwap. // appengine.MultiError may be returned. func CompareAndSwapMulti(c context.Context, item []*Item) error { return set(c, item, nil, pb.MemcacheSetRequest_CAS) } // Codec represents a symmetric pair of functions that implement a codec. // Items stored into or retrieved from memcache using a Codec have their // values marshaled or unmarshaled. // // All the methods provided for Codec behave analogously to the package level // function with same name. type Codec struct { Marshal func(interface{}) ([]byte, error) Unmarshal func([]byte, interface{}) error } // Get gets the item for the given key and decodes the obtained value into v. // ErrCacheMiss is returned for a memcache cache miss. // The key must be at most 250 bytes in length. func (cd Codec) Get(c context.Context, key string, v interface{}) (*Item, error) { i, err := Get(c, key) if err != nil { return nil, err } if err := cd.Unmarshal(i.Value, v); err != nil { return nil, err } return i, nil } func (cd Codec) set(c context.Context, items []*Item, policy pb.MemcacheSetRequest_SetPolicy) error { var vs [][]byte var me appengine.MultiError for i, item := range items { v, err := cd.Marshal(item.Object) if err != nil { if me == nil { me = make(appengine.MultiError, len(items)) } me[i] = err continue } if me == nil { vs = append(vs, v) } } if me != nil { return me } return set(c, items, vs, policy) } // Set writes the given item, unconditionally. func (cd Codec) Set(c context.Context, item *Item) error { return singleError(cd.set(c, []*Item{item}, pb.MemcacheSetRequest_SET)) } // SetMulti is a batch version of Set. // appengine.MultiError may be returned. func (cd Codec) SetMulti(c context.Context, items []*Item) error { return cd.set(c, items, pb.MemcacheSetRequest_SET) } // Add writes the given item, if no value already exists for its key. // ErrNotStored is returned if that condition is not met. func (cd Codec) Add(c context.Context, item *Item) error { return singleError(cd.set(c, []*Item{item}, pb.MemcacheSetRequest_ADD)) } // AddMulti is a batch version of Add. // appengine.MultiError may be returned. func (cd Codec) AddMulti(c context.Context, items []*Item) error { return cd.set(c, items, pb.MemcacheSetRequest_ADD) } // CompareAndSwap writes the given item that was previously returned by Get, // if the value was neither modified or evicted between the Get and the // CompareAndSwap calls. The item's Key should not change between calls but // all other item fields may differ. // ErrCASConflict is returned if the value was modified in between the calls. // ErrNotStored is returned if the value was evicted in between the calls. func (cd Codec) CompareAndSwap(c context.Context, item *Item) error { return singleError(cd.set(c, []*Item{item}, pb.MemcacheSetRequest_CAS)) } // CompareAndSwapMulti is a batch version of CompareAndSwap. // appengine.MultiError may be returned. func (cd Codec) CompareAndSwapMulti(c context.Context, items []*Item) error { return cd.set(c, items, pb.MemcacheSetRequest_CAS) } var ( // Gob is a Codec that uses the gob package. Gob = Codec{gobMarshal, gobUnmarshal} // JSON is a Codec that uses the json package. JSON = Codec{json.Marshal, json.Unmarshal} ) func gobMarshal(v interface{}) ([]byte, error) { var buf bytes.Buffer if err := gob.NewEncoder(&buf).Encode(v); err != nil { return nil, err } return buf.Bytes(), nil } func gobUnmarshal(data []byte, v interface{}) error { return gob.NewDecoder(bytes.NewBuffer(data)).Decode(v) } // Statistics represents a set of statistics about the memcache cache. // This may include items that have expired but have not yet been removed from the cache. type Statistics struct { Hits uint64 // Counter of cache hits Misses uint64 // Counter of cache misses ByteHits uint64 // Counter of bytes transferred for gets Items uint64 // Items currently in the cache Bytes uint64 // Size of all items currently in the cache Oldest int64 // Age of access of the oldest item, in seconds } // Stats retrieves the current memcache statistics. func Stats(c context.Context) (*Statistics, error) { req := &pb.MemcacheStatsRequest{} res := &pb.MemcacheStatsResponse{} if err := internal.Call(c, "memcache", "Stats", req, res); err != nil { return nil, err } if res.Stats == nil { return nil, ErrNoStats } return &Statistics{ Hits: *res.Stats.Hits, Misses: *res.Stats.Misses, ByteHits: *res.Stats.ByteHits, Items: *res.Stats.Items, Bytes: *res.Stats.Bytes, Oldest: int64(*res.Stats.OldestItemAge), }, nil } // Flush flushes all items from memcache. func Flush(c context.Context) error { req := &pb.MemcacheFlushRequest{} res := &pb.MemcacheFlushResponse{} return internal.Call(c, "memcache", "FlushAll", req, res) } func namespaceMod(m proto.Message, namespace string) { switch m := m.(type) { case *pb.MemcacheDeleteRequest: if m.NameSpace == nil { m.NameSpace = &namespace } case *pb.MemcacheGetRequest: if m.NameSpace == nil { m.NameSpace = &namespace } case *pb.MemcacheIncrementRequest: if m.NameSpace == nil { m.NameSpace = &namespace } case *pb.MemcacheSetRequest: if m.NameSpace == nil { m.NameSpace = &namespace } // MemcacheFlushRequest, MemcacheStatsRequest do not apply namespace. } } func init() { internal.RegisterErrorCodeMap("memcache", pb.MemcacheServiceError_ErrorCode_name) internal.NamespaceMods["memcache"] = namespaceMod }
urlfetch
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/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/v2/urlfetch" import ( "context" "errors" "fmt" "io" "io/ioutil" "net/http" "net/url" "strconv" "strings" "time" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/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)) }
aebundler
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/cmd/aebundler/aebundler.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. // Program aebundler turns a Go app into a fully self-contained tar file. // The app and its subdirectories (if any) are placed under "." // and the dependencies from $GOPATH are placed under ./_gopath/src. // A main func is synthesized if one does not exist. // // A sample Dockerfile to be used with this bundler could look like this: // // FROM gcr.io/google-appengine/go-compat // ADD . /app // RUN GOPATH=/app/_gopath go build -tags appenginevm -o /app/_ah/exe package main import ( "archive/tar" "flag" "fmt" "go/ast" "go/build" "go/parser" "go/token" "io" "io/ioutil" "os" "path/filepath" "strings" ) var ( output = flag.String("o", "", "name of output tar file or '-' for stdout") rootDir = flag.String("root", ".", "directory name of application root") vm = flag.Bool("vm", true, `bundle an app for App Engine "flexible environment"`) skipFiles = map[string]bool{ ".git": true, ".gitconfig": true, ".hg": true, ".travis.yml": true, } ) const ( newMain = `package main import "google.golang.org/appengine/v2" func main() { appengine.Main() } ` ) func usage() { fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0]) fmt.Fprintf(os.Stderr, "\t%s -o <file.tar|->\tBundle app to named tar file or stdout\n", os.Args[0]) fmt.Fprintf(os.Stderr, "\noptional arguments:\n") flag.PrintDefaults() } func main() { flag.Usage = usage flag.Parse() var tags []string if *vm { tags = append(tags, "appenginevm") } else { tags = append(tags, "appengine") } tarFile := *output if tarFile == "" { usage() errorf("Required -o flag not specified.") } app, err := analyze(tags) if err != nil { errorf("Error analyzing app: %v", err) } if err := app.bundle(tarFile); err != nil { errorf("Unable to bundle app: %v", err) } } // errorf prints the error message and exits. func errorf(format string, a ...interface{}) { fmt.Fprintf(os.Stderr, "aebundler: "+format+"\n", a...) os.Exit(1) } type app struct { hasMain bool appFiles []string imports map[string]string } // analyze checks the app for building with the given build tags and returns hasMain, // app files, and a map of full directory import names to original import names. func analyze(tags []string) (*app, error) { ctxt := buildContext(tags) hasMain, appFiles, err := checkMain(ctxt) if err != nil { return nil, err } gopath := filepath.SplitList(ctxt.GOPATH) im, err := imports(ctxt, *rootDir, gopath) return &app{ hasMain: hasMain, appFiles: appFiles, imports: im, }, err } // buildContext returns the context for building the source. func buildContext(tags []string) *build.Context { return &build.Context{ GOARCH: build.Default.GOARCH, GOOS: build.Default.GOOS, GOROOT: build.Default.GOROOT, GOPATH: build.Default.GOPATH, Compiler: build.Default.Compiler, BuildTags: append(build.Default.BuildTags, tags...), } } // bundle bundles the app into the named tarFile ("-"==stdout). func (s *app) bundle(tarFile string) (err error) { var out io.Writer if tarFile == "-" { out = os.Stdout } else { f, err := os.Create(tarFile) if err != nil { return err } defer func() { if cerr := f.Close(); err == nil { err = cerr } }() out = f } tw := tar.NewWriter(out) for srcDir, importName := range s.imports { dstDir := "_gopath/src/" + importName if err = copyTree(tw, dstDir, srcDir); err != nil { return fmt.Errorf("unable to copy directory %v to %v: %v", srcDir, dstDir, err) } } if err := copyTree(tw, ".", *rootDir); err != nil { return fmt.Errorf("unable to copy root directory to /app: %v", err) } if !s.hasMain { if err := synthesizeMain(tw, s.appFiles); err != nil { return fmt.Errorf("unable to synthesize new main func: %v", err) } } if err := tw.Close(); err != nil { return fmt.Errorf("unable to close tar file %v: %v", tarFile, err) } return nil } // synthesizeMain generates a new main func and writes it to the tarball. func synthesizeMain(tw *tar.Writer, appFiles []string) error { appMap := make(map[string]bool) for _, f := range appFiles { appMap[f] = true } var f string for i := 0; i < 100; i++ { f = fmt.Sprintf("app_main%d.go", i) if !appMap[filepath.Join(*rootDir, f)] { break } } if appMap[filepath.Join(*rootDir, f)] { return fmt.Errorf("unable to find unique name for %v", f) } hdr := &tar.Header{ Name: f, Mode: 0644, Size: int64(len(newMain)), } if err := tw.WriteHeader(hdr); err != nil { return fmt.Errorf("unable to write header for %v: %v", f, err) } if _, err := tw.Write([]byte(newMain)); err != nil { return fmt.Errorf("unable to write %v to tar file: %v", f, err) } return nil } // imports returns a map of all import directories (recursively) used by the app. // The return value maps full directory names to original import names. func imports(ctxt *build.Context, srcDir string, gopath []string) (map[string]string, error) { pkg, err := ctxt.ImportDir(srcDir, 0) if err != nil { return nil, fmt.Errorf("unable to analyze source: %v", err) } // Resolve all non-standard-library imports result := make(map[string]string) for _, v := range pkg.Imports { if !strings.Contains(v, ".") { continue } src, err := findInGopath(v, gopath) if err != nil { return nil, fmt.Errorf("unable to find import %v in gopath %v: %v", v, gopath, err) } result[src] = v im, err := imports(ctxt, src, gopath) if err != nil { return nil, fmt.Errorf("unable to parse package %v: %v", src, err) } for k, v := range im { result[k] = v } } return result, nil } // findInGopath searches the gopath for the named import directory. func findInGopath(dir string, gopath []string) (string, error) { for _, v := range gopath { dst := filepath.Join(v, "src", dir) if _, err := os.Stat(dst); err == nil { return dst, nil } } return "", fmt.Errorf("unable to find package %v in gopath %v", dir, gopath) } // copyTree copies srcDir to tar file dstDir, ignoring skipFiles. func copyTree(tw *tar.Writer, dstDir, srcDir string) error { entries, err := ioutil.ReadDir(srcDir) if err != nil { return fmt.Errorf("unable to read dir %v: %v", srcDir, err) } for _, entry := range entries { n := entry.Name() if skipFiles[n] { continue } s := filepath.Join(srcDir, n) d := filepath.Join(dstDir, n) if entry.IsDir() { if err := copyTree(tw, d, s); err != nil { return fmt.Errorf("unable to copy dir %v to %v: %v", s, d, err) } continue } if err := copyFile(tw, d, s); err != nil { return fmt.Errorf("unable to copy dir %v to %v: %v", s, d, err) } } return nil } // copyFile copies src to tar file dst. func copyFile(tw *tar.Writer, dst, src string) error { s, err := os.Open(src) if err != nil { return fmt.Errorf("unable to open %v: %v", src, err) } defer s.Close() fi, err := s.Stat() if err != nil { return fmt.Errorf("unable to stat %v: %v", src, err) } hdr, err := tar.FileInfoHeader(fi, dst) if err != nil { return fmt.Errorf("unable to create tar header for %v: %v", dst, err) } hdr.Name = dst if err := tw.WriteHeader(hdr); err != nil { return fmt.Errorf("unable to write header for %v: %v", dst, err) } _, err = io.Copy(tw, s) if err != nil { return fmt.Errorf("unable to copy %v to %v: %v", src, dst, err) } return nil } // checkMain verifies that there is a single "main" function. // It also returns a list of all Go source files in the app. func checkMain(ctxt *build.Context) (bool, []string, error) { pkg, err := ctxt.ImportDir(*rootDir, 0) if err != nil { return false, nil, fmt.Errorf("unable to analyze source: %v", err) } if !pkg.IsCommand() { errorf("Your app's package needs to be changed from %q to \"main\".\n", pkg.Name) } // Search for a "func main" var hasMain bool var appFiles []string for _, f := range pkg.GoFiles { n := filepath.Join(*rootDir, f) appFiles = append(appFiles, n) if hasMain, err = readFile(n); err != nil { return false, nil, fmt.Errorf("error parsing %q: %v", n, err) } } return hasMain, appFiles, nil } // isMain returns whether the given function declaration is a main function. // Such a function must be called "main", not have a receiver, and have no arguments or return types. func isMain(f *ast.FuncDecl) bool { ft := f.Type return f.Name.Name == "main" && f.Recv == nil && ft.Params.NumFields() == 0 && ft.Results.NumFields() == 0 } // readFile reads and parses the Go source code file and returns whether it has a main function. func readFile(filename string) (hasMain bool, err error) { var src []byte src, err = ioutil.ReadFile(filename) if err != nil { return } fset := token.NewFileSet() file, err := parser.ParseFile(fset, filename, src, 0) for _, decl := range file.Decls { funcDecl, ok := decl.(*ast.FuncDecl) if !ok { continue } if !isMain(funcDecl) { continue } hasMain = true break } return }
aefix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/cmd/aefix/main_test.go
// 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. package main import ( "go/ast" "go/parser" "strings" "testing" ) type testCase struct { Name string Fn func(*ast.File) bool In string Out string } var testCases []testCase func addTestCases(t []testCase, fn func(*ast.File) bool) { // Fill in fn to avoid repetition in definitions. if fn != nil { for i := range t { if t[i].Fn == nil { t[i].Fn = fn } } } testCases = append(testCases, t...) } func fnop(*ast.File) bool { return false } func parseFixPrint(t *testing.T, fn func(*ast.File) bool, desc, in string, mustBeGofmt bool) (out string, fixed, ok bool) { file, err := parser.ParseFile(fset, desc, in, parserMode) if err != nil { t.Errorf("%s: parsing: %v", desc, err) return } outb, err := gofmtFile(file) if err != nil { t.Errorf("%s: printing: %v", desc, err) return } if s := string(outb); in != s && mustBeGofmt { t.Errorf("%s: not gofmt-formatted.\n--- %s\n%s\n--- %s | gofmt\n%s", desc, desc, in, desc, s) tdiff(t, in, s) return } if fn == nil { for _, fix := range fixes { if fix.f(file) { fixed = true } } } else { fixed = fn(file) } outb, err = gofmtFile(file) if err != nil { t.Errorf("%s: printing: %v", desc, err) return } return string(outb), fixed, true } func TestRewrite(t *testing.T) { for _, tt := range testCases { // Apply fix: should get tt.Out. out, fixed, ok := parseFixPrint(t, tt.Fn, tt.Name, tt.In, true) if !ok { continue } // reformat to get printing right out, _, ok = parseFixPrint(t, fnop, tt.Name, out, false) if !ok { continue } if out != tt.Out { t.Errorf("%s: incorrect output.\n", tt.Name) if !strings.HasPrefix(tt.Name, "testdata/") { t.Errorf("--- have\n%s\n--- want\n%s", out, tt.Out) } tdiff(t, out, tt.Out) continue } if changed := out != tt.In; changed != fixed { t.Errorf("%s: changed=%v != fixed=%v", tt.Name, changed, fixed) continue } // Should not change if run again. out2, fixed2, ok := parseFixPrint(t, tt.Fn, tt.Name+" output", out, true) if !ok { continue } if fixed2 { t.Errorf("%s: applied fixes during second round", tt.Name) continue } if out2 != out { t.Errorf("%s: changed output after second round of fixes.\n--- output after first round\n%s\n--- output after second round\n%s", tt.Name, out, out2) tdiff(t, out, out2) } } } func tdiff(t *testing.T, a, b string) { data, err := diff([]byte(a), []byte(b)) if err != nil { t.Error(err) return } t.Error(string(data)) }
aefix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/cmd/aefix/fix.go
// 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. package main import ( "fmt" "go/ast" "go/parser" "go/token" "os" "path" "reflect" "strconv" "strings" ) type fix struct { name string date string // date that fix was introduced, in YYYY-MM-DD format f func(*ast.File) bool desc string } // main runs sort.Sort(byName(fixes)) before printing list of fixes. type byName []fix func (f byName) Len() int { return len(f) } func (f byName) Swap(i, j int) { f[i], f[j] = f[j], f[i] } func (f byName) Less(i, j int) bool { return f[i].name < f[j].name } // main runs sort.Sort(byDate(fixes)) before applying fixes. type byDate []fix func (f byDate) Len() int { return len(f) } func (f byDate) Swap(i, j int) { f[i], f[j] = f[j], f[i] } func (f byDate) Less(i, j int) bool { return f[i].date < f[j].date } var fixes []fix func register(f fix) { fixes = append(fixes, f) } // walk traverses the AST x, calling visit(y) for each node y in the tree but // also with a pointer to each ast.Expr, ast.Stmt, and *ast.BlockStmt, // in a bottom-up traversal. func walk(x interface{}, visit func(interface{})) { walkBeforeAfter(x, nop, visit) } func nop(interface{}) {} // walkBeforeAfter is like walk but calls before(x) before traversing // x's children and after(x) afterward. func walkBeforeAfter(x interface{}, before, after func(interface{})) { before(x) switch n := x.(type) { default: panic(fmt.Errorf("unexpected type %T in walkBeforeAfter", x)) case nil: // pointers to interfaces case *ast.Decl: walkBeforeAfter(*n, before, after) case *ast.Expr: walkBeforeAfter(*n, before, after) case *ast.Spec: walkBeforeAfter(*n, before, after) case *ast.Stmt: walkBeforeAfter(*n, before, after) // pointers to struct pointers case **ast.BlockStmt: walkBeforeAfter(*n, before, after) case **ast.CallExpr: walkBeforeAfter(*n, before, after) case **ast.FieldList: walkBeforeAfter(*n, before, after) case **ast.FuncType: walkBeforeAfter(*n, before, after) case **ast.Ident: walkBeforeAfter(*n, before, after) case **ast.BasicLit: walkBeforeAfter(*n, before, after) // pointers to slices case *[]ast.Decl: walkBeforeAfter(*n, before, after) case *[]ast.Expr: walkBeforeAfter(*n, before, after) case *[]*ast.File: walkBeforeAfter(*n, before, after) case *[]*ast.Ident: walkBeforeAfter(*n, before, after) case *[]ast.Spec: walkBeforeAfter(*n, before, after) case *[]ast.Stmt: walkBeforeAfter(*n, before, after) // These are ordered and grouped to match ../../pkg/go/ast/ast.go case *ast.Field: walkBeforeAfter(&n.Names, before, after) walkBeforeAfter(&n.Type, before, after) walkBeforeAfter(&n.Tag, before, after) case *ast.FieldList: for _, field := range n.List { walkBeforeAfter(field, before, after) } case *ast.BadExpr: case *ast.Ident: case *ast.Ellipsis: walkBeforeAfter(&n.Elt, before, after) case *ast.BasicLit: case *ast.FuncLit: walkBeforeAfter(&n.Type, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.CompositeLit: walkBeforeAfter(&n.Type, before, after) walkBeforeAfter(&n.Elts, before, after) case *ast.ParenExpr: walkBeforeAfter(&n.X, before, after) case *ast.SelectorExpr: walkBeforeAfter(&n.X, before, after) case *ast.IndexExpr: walkBeforeAfter(&n.X, before, after) walkBeforeAfter(&n.Index, before, after) case *ast.SliceExpr: walkBeforeAfter(&n.X, before, after) if n.Low != nil { walkBeforeAfter(&n.Low, before, after) } if n.High != nil { walkBeforeAfter(&n.High, before, after) } case *ast.TypeAssertExpr: walkBeforeAfter(&n.X, before, after) walkBeforeAfter(&n.Type, before, after) case *ast.CallExpr: walkBeforeAfter(&n.Fun, before, after) walkBeforeAfter(&n.Args, before, after) case *ast.StarExpr: walkBeforeAfter(&n.X, before, after) case *ast.UnaryExpr: walkBeforeAfter(&n.X, before, after) case *ast.BinaryExpr: walkBeforeAfter(&n.X, before, after) walkBeforeAfter(&n.Y, before, after) case *ast.KeyValueExpr: walkBeforeAfter(&n.Key, before, after) walkBeforeAfter(&n.Value, before, after) case *ast.ArrayType: walkBeforeAfter(&n.Len, before, after) walkBeforeAfter(&n.Elt, before, after) case *ast.StructType: walkBeforeAfter(&n.Fields, before, after) case *ast.FuncType: walkBeforeAfter(&n.Params, before, after) if n.Results != nil { walkBeforeAfter(&n.Results, before, after) } case *ast.InterfaceType: walkBeforeAfter(&n.Methods, before, after) case *ast.MapType: walkBeforeAfter(&n.Key, before, after) walkBeforeAfter(&n.Value, before, after) case *ast.ChanType: walkBeforeAfter(&n.Value, before, after) case *ast.BadStmt: case *ast.DeclStmt: walkBeforeAfter(&n.Decl, before, after) case *ast.EmptyStmt: case *ast.LabeledStmt: walkBeforeAfter(&n.Stmt, before, after) case *ast.ExprStmt: walkBeforeAfter(&n.X, before, after) case *ast.SendStmt: walkBeforeAfter(&n.Chan, before, after) walkBeforeAfter(&n.Value, before, after) case *ast.IncDecStmt: walkBeforeAfter(&n.X, before, after) case *ast.AssignStmt: walkBeforeAfter(&n.Lhs, before, after) walkBeforeAfter(&n.Rhs, before, after) case *ast.GoStmt: walkBeforeAfter(&n.Call, before, after) case *ast.DeferStmt: walkBeforeAfter(&n.Call, before, after) case *ast.ReturnStmt: walkBeforeAfter(&n.Results, before, after) case *ast.BranchStmt: case *ast.BlockStmt: walkBeforeAfter(&n.List, before, after) case *ast.IfStmt: walkBeforeAfter(&n.Init, before, after) walkBeforeAfter(&n.Cond, before, after) walkBeforeAfter(&n.Body, before, after) walkBeforeAfter(&n.Else, before, after) case *ast.CaseClause: walkBeforeAfter(&n.List, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.SwitchStmt: walkBeforeAfter(&n.Init, before, after) walkBeforeAfter(&n.Tag, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.TypeSwitchStmt: walkBeforeAfter(&n.Init, before, after) walkBeforeAfter(&n.Assign, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.CommClause: walkBeforeAfter(&n.Comm, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.SelectStmt: walkBeforeAfter(&n.Body, before, after) case *ast.ForStmt: walkBeforeAfter(&n.Init, before, after) walkBeforeAfter(&n.Cond, before, after) walkBeforeAfter(&n.Post, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.RangeStmt: walkBeforeAfter(&n.Key, before, after) walkBeforeAfter(&n.Value, before, after) walkBeforeAfter(&n.X, before, after) walkBeforeAfter(&n.Body, before, after) case *ast.ImportSpec: case *ast.ValueSpec: walkBeforeAfter(&n.Type, before, after) walkBeforeAfter(&n.Values, before, after) walkBeforeAfter(&n.Names, before, after) case *ast.TypeSpec: walkBeforeAfter(&n.Type, before, after) case *ast.BadDecl: case *ast.GenDecl: walkBeforeAfter(&n.Specs, before, after) case *ast.FuncDecl: if n.Recv != nil { walkBeforeAfter(&n.Recv, before, after) } walkBeforeAfter(&n.Type, before, after) if n.Body != nil { walkBeforeAfter(&n.Body, before, after) } case *ast.File: walkBeforeAfter(&n.Decls, before, after) case *ast.Package: walkBeforeAfter(&n.Files, before, after) case []*ast.File: for i := range n { walkBeforeAfter(&n[i], before, after) } case []ast.Decl: for i := range n { walkBeforeAfter(&n[i], before, after) } case []ast.Expr: for i := range n { walkBeforeAfter(&n[i], before, after) } case []*ast.Ident: for i := range n { walkBeforeAfter(&n[i], before, after) } case []ast.Stmt: for i := range n { walkBeforeAfter(&n[i], before, after) } case []ast.Spec: for i := range n { walkBeforeAfter(&n[i], before, after) } } after(x) } // imports returns true if f imports path. func imports(f *ast.File, path string) bool { return importSpec(f, path) != nil } // importSpec returns the import spec if f imports path, // or nil otherwise. func importSpec(f *ast.File, path string) *ast.ImportSpec { for _, s := range f.Imports { if importPath(s) == path { return s } } return nil } // importPath returns the unquoted import path of s, // or "" if the path is not properly quoted. func importPath(s *ast.ImportSpec) string { t, err := strconv.Unquote(s.Path.Value) if err == nil { return t } return "" } // declImports reports whether gen contains an import of path. func declImports(gen *ast.GenDecl, path string) bool { if gen.Tok != token.IMPORT { return false } for _, spec := range gen.Specs { impspec := spec.(*ast.ImportSpec) if importPath(impspec) == path { return true } } return false } // isPkgDot returns true if t is the expression "pkg.name" // where pkg is an imported identifier. func isPkgDot(t ast.Expr, pkg, name string) bool { sel, ok := t.(*ast.SelectorExpr) return ok && isTopName(sel.X, pkg) && sel.Sel.String() == name } // isPtrPkgDot returns true if f is the expression "*pkg.name" // where pkg is an imported identifier. func isPtrPkgDot(t ast.Expr, pkg, name string) bool { ptr, ok := t.(*ast.StarExpr) return ok && isPkgDot(ptr.X, pkg, name) } // isTopName returns true if n is a top-level unresolved identifier with the given name. func isTopName(n ast.Expr, name string) bool { id, ok := n.(*ast.Ident) return ok && id.Name == name && id.Obj == nil } // isName returns true if n is an identifier with the given name. func isName(n ast.Expr, name string) bool { id, ok := n.(*ast.Ident) return ok && id.String() == name } // isCall returns true if t is a call to pkg.name. func isCall(t ast.Expr, pkg, name string) bool { call, ok := t.(*ast.CallExpr) return ok && isPkgDot(call.Fun, pkg, name) } // If n is an *ast.Ident, isIdent returns it; otherwise isIdent returns nil. func isIdent(n interface{}) *ast.Ident { id, _ := n.(*ast.Ident) return id } // refersTo returns true if n is a reference to the same object as x. func refersTo(n ast.Node, x *ast.Ident) bool { id, ok := n.(*ast.Ident) // The test of id.Name == x.Name handles top-level unresolved // identifiers, which all have Obj == nil. return ok && id.Obj == x.Obj && id.Name == x.Name } // isBlank returns true if n is the blank identifier. func isBlank(n ast.Expr) bool { return isName(n, "_") } // isEmptyString returns true if n is an empty string literal. func isEmptyString(n ast.Expr) bool { lit, ok := n.(*ast.BasicLit) return ok && lit.Kind == token.STRING && len(lit.Value) == 2 } func warn(pos token.Pos, msg string, args ...interface{}) { if pos.IsValid() { msg = "%s: " + msg arg1 := []interface{}{fset.Position(pos).String()} args = append(arg1, args...) } fmt.Fprintf(os.Stderr, msg+"\n", args...) } // countUses returns the number of uses of the identifier x in scope. func countUses(x *ast.Ident, scope []ast.Stmt) int { count := 0 ff := func(n interface{}) { if n, ok := n.(ast.Node); ok && refersTo(n, x) { count++ } } for _, n := range scope { walk(n, ff) } return count } // rewriteUses replaces all uses of the identifier x and !x in scope // with f(x.Pos()) and fnot(x.Pos()). func rewriteUses(x *ast.Ident, f, fnot func(token.Pos) ast.Expr, scope []ast.Stmt) { var lastF ast.Expr ff := func(n interface{}) { ptr, ok := n.(*ast.Expr) if !ok { return } nn := *ptr // The child node was just walked and possibly replaced. // If it was replaced and this is a negation, replace with fnot(p). not, ok := nn.(*ast.UnaryExpr) if ok && not.Op == token.NOT && not.X == lastF { *ptr = fnot(nn.Pos()) return } if refersTo(nn, x) { lastF = f(nn.Pos()) *ptr = lastF } } for _, n := range scope { walk(n, ff) } } // assignsTo returns true if any of the code in scope assigns to or takes the address of x. func assignsTo(x *ast.Ident, scope []ast.Stmt) bool { assigned := false ff := func(n interface{}) { if assigned { return } switch n := n.(type) { case *ast.UnaryExpr: // use of &x if n.Op == token.AND && refersTo(n.X, x) { assigned = true return } case *ast.AssignStmt: for _, l := range n.Lhs { if refersTo(l, x) { assigned = true return } } } } for _, n := range scope { if assigned { break } walk(n, ff) } return assigned } // newPkgDot returns an ast.Expr referring to "pkg.name" at position pos. func newPkgDot(pos token.Pos, pkg, name string) ast.Expr { return &ast.SelectorExpr{ X: &ast.Ident{ NamePos: pos, Name: pkg, }, Sel: &ast.Ident{ NamePos: pos, Name: name, }, } } // renameTop renames all references to the top-level name old. // It returns true if it makes any changes. func renameTop(f *ast.File, old, new string) bool { var fixed bool // Rename any conflicting imports // (assuming package name is last element of path). for _, s := range f.Imports { if s.Name != nil { if s.Name.Name == old { s.Name.Name = new fixed = true } } else { _, thisName := path.Split(importPath(s)) if thisName == old { s.Name = ast.NewIdent(new) fixed = true } } } // Rename any top-level declarations. for _, d := range f.Decls { switch d := d.(type) { case *ast.FuncDecl: if d.Recv == nil && d.Name.Name == old { d.Name.Name = new d.Name.Obj.Name = new fixed = true } case *ast.GenDecl: for _, s := range d.Specs { switch s := s.(type) { case *ast.TypeSpec: if s.Name.Name == old { s.Name.Name = new s.Name.Obj.Name = new fixed = true } case *ast.ValueSpec: for _, n := range s.Names { if n.Name == old { n.Name = new n.Obj.Name = new fixed = true } } } } } } // Rename top-level old to new, both unresolved names // (probably defined in another file) and names that resolve // to a declaration we renamed. walk(f, func(n interface{}) { id, ok := n.(*ast.Ident) if ok && isTopName(id, old) { id.Name = new fixed = true } if ok && id.Obj != nil && id.Name == old && id.Obj.Name == new { id.Name = id.Obj.Name fixed = true } }) return fixed } // matchLen returns the length of the longest prefix shared by x and y. func matchLen(x, y string) int { i := 0 for i < len(x) && i < len(y) && x[i] == y[i] { i++ } return i } // addImport adds the import path to the file f, if absent. func addImport(f *ast.File, ipath string) (added bool) { if imports(f, ipath) { return false } // Determine name of import. // Assume added imports follow convention of using last element. _, name := path.Split(ipath) // Rename any conflicting top-level references from name to name_. renameTop(f, name, name+"_") newImport := &ast.ImportSpec{ Path: &ast.BasicLit{ Kind: token.STRING, Value: strconv.Quote(ipath), }, } // Find an import decl to add to. var ( bestMatch = -1 lastImport = -1 impDecl *ast.GenDecl impIndex = -1 ) for i, decl := range f.Decls { gen, ok := decl.(*ast.GenDecl) if ok && gen.Tok == token.IMPORT { lastImport = i // Do not add to import "C", to avoid disrupting the // association with its doc comment, breaking cgo. if declImports(gen, "C") { continue } // Compute longest shared prefix with imports in this block. for j, spec := range gen.Specs { impspec := spec.(*ast.ImportSpec) n := matchLen(importPath(impspec), ipath) if n > bestMatch { bestMatch = n impDecl = gen impIndex = j } } } } // If no import decl found, add one after the last import. if impDecl == nil { impDecl = &ast.GenDecl{ Tok: token.IMPORT, } f.Decls = append(f.Decls, nil) copy(f.Decls[lastImport+2:], f.Decls[lastImport+1:]) f.Decls[lastImport+1] = impDecl } // Ensure the import decl has parentheses, if needed. if len(impDecl.Specs) > 0 && !impDecl.Lparen.IsValid() { impDecl.Lparen = impDecl.Pos() } insertAt := impIndex + 1 if insertAt == 0 { insertAt = len(impDecl.Specs) } impDecl.Specs = append(impDecl.Specs, nil) copy(impDecl.Specs[insertAt+1:], impDecl.Specs[insertAt:]) impDecl.Specs[insertAt] = newImport if insertAt > 0 { // Assign same position as the previous import, // so that the sorter sees it as being in the same block. prev := impDecl.Specs[insertAt-1] newImport.Path.ValuePos = prev.Pos() newImport.EndPos = prev.Pos() } f.Imports = append(f.Imports, newImport) return true } // deleteImport deletes the import path from the file f, if present. func deleteImport(f *ast.File, path string) (deleted bool) { oldImport := importSpec(f, path) // Find the import node that imports path, if any. for i, decl := range f.Decls { gen, ok := decl.(*ast.GenDecl) if !ok || gen.Tok != token.IMPORT { continue } for j, spec := range gen.Specs { impspec := spec.(*ast.ImportSpec) if oldImport != impspec { continue } // We found an import spec that imports path. // Delete it. deleted = true copy(gen.Specs[j:], gen.Specs[j+1:]) gen.Specs = gen.Specs[:len(gen.Specs)-1] // If this was the last import spec in this decl, // delete the decl, too. if len(gen.Specs) == 0 { copy(f.Decls[i:], f.Decls[i+1:]) f.Decls = f.Decls[:len(f.Decls)-1] } else if len(gen.Specs) == 1 { gen.Lparen = token.NoPos // drop parens } if j > 0 { // We deleted an entry but now there will be // a blank line-sized hole where the import was. // Close the hole by making the previous // import appear to "end" where this one did. gen.Specs[j-1].(*ast.ImportSpec).EndPos = impspec.End() } break } } // Delete it from f.Imports. for i, imp := range f.Imports { if imp == oldImport { copy(f.Imports[i:], f.Imports[i+1:]) f.Imports = f.Imports[:len(f.Imports)-1] break } } return } // rewriteImport rewrites any import of path oldPath to path newPath. func rewriteImport(f *ast.File, oldPath, newPath string) (rewrote bool) { for _, imp := range f.Imports { if importPath(imp) == oldPath { rewrote = true // record old End, because the default is to compute // it using the length of imp.Path.Value. imp.EndPos = imp.End() imp.Path.Value = strconv.Quote(newPath) } } return } func usesImport(f *ast.File, path string) (used bool) { spec := importSpec(f, path) if spec == nil { return } name := spec.Name.String() switch name { case "<nil>": // If the package name is not explicitly specified, // make an educated guess. This is not guaranteed to be correct. if strings.HasSuffix(path, "/v2") { path = strings.TrimRight(path, "/v2") } lastSlash := strings.LastIndex(path, "/") if lastSlash == -1 { name = path } else { name = path[lastSlash+1:] } case "_", ".": // Not sure if this import is used - err on the side of caution. return true } walk(f, func(n interface{}) { sel, ok := n.(*ast.SelectorExpr) if ok && isTopName(sel.X, name) { used = true } }) return } func expr(s string) ast.Expr { x, err := parser.ParseExpr(s) if err != nil { panic("parsing " + s + ": " + err.Error()) } // Remove position information to avoid spurious newlines. killPos(reflect.ValueOf(x)) return x } var posType = reflect.TypeOf(token.Pos(0)) func killPos(v reflect.Value) { switch v.Kind() { case reflect.Ptr, reflect.Interface: if !v.IsNil() { killPos(v.Elem()) } case reflect.Slice: n := v.Len() for i := 0; i < n; i++ { killPos(v.Index(i)) } case reflect.Struct: n := v.NumField() for i := 0; i < n; i++ { f := v.Field(i) if f.Type() == posType { f.SetInt(0) continue } killPos(f) } } } // A Rename describes a single renaming. type rename struct { OldImport string // only apply rename if this import is present NewImport string // add this import during rewrite Old string // old name: p.T or *p.T New string // new name: p.T or *p.T } func renameFix(tab []rename) func(*ast.File) bool { return func(f *ast.File) bool { return renameFixTab(f, tab) } } func parseName(s string) (ptr bool, pkg, nam string) { i := strings.Index(s, ".") if i < 0 { panic("parseName: invalid name " + s) } if strings.HasPrefix(s, "*") { ptr = true s = s[1:] i-- } pkg = s[:i] nam = s[i+1:] return } func renameFixTab(f *ast.File, tab []rename) bool { fixed := false added := map[string]bool{} check := map[string]bool{} for _, t := range tab { if !imports(f, t.OldImport) { continue } optr, opkg, onam := parseName(t.Old) walk(f, func(n interface{}) { np, ok := n.(*ast.Expr) if !ok { return } x := *np if optr { p, ok := x.(*ast.StarExpr) if !ok { return } x = p.X } if !isPkgDot(x, opkg, onam) { return } if t.NewImport != "" && !added[t.NewImport] { addImport(f, t.NewImport) added[t.NewImport] = true } *np = expr(t.New) check[t.OldImport] = true fixed = true }) } for ipath := range check { if !usesImport(f, ipath) { deleteImport(f, ipath) } } return fixed }
aefix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/cmd/aefix/ae.go
// Copyright 2016 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 main import ( "go/ast" "strconv" "strings" ) const ( ctxPackage = "context" newPackageBase = "google.golang.org/" ) func init() { register(fix{ "ae", "2016-04-15", aeFn, `Update old App Engine APIs to new App Engine APIs`, }) } // logMethod is the set of methods on appengine.Context used for logging. var logMethod = map[string]bool{ "Debugf": true, "Infof": true, "Warningf": true, "Errorf": true, "Criticalf": true, } // mapPackage turns "appengine" into "google.golang.org/appengine/v2", etc. func mapPackage(s string) string { return newPackageBase + strings.Replace(s, "appengine", "appengine/v2", 1) } func aeFn(f *ast.File) bool { // During the walk, we track the last thing seen that looks like // an appengine.Context, and reset it once the walk leaves a func. var lastContext *ast.Ident fixed := false // Update imports. mainImp := "appengine" for _, imp := range f.Imports { pth, _ := strconv.Unquote(imp.Path.Value) if pth == "appengine" || strings.HasPrefix(pth, "appengine/") { newPth := mapPackage(pth) imp.Path.Value = strconv.Quote(newPth) fixed = true if pth == "appengine" { mainImp = newPth } } } // Update any API changes. walk(f, func(n interface{}) { if ft, ok := n.(*ast.FuncType); ok && ft.Params != nil { // See if this func has an `appengine.Context arg`. // If so, remember its identifier. for _, param := range ft.Params.List { if !isPkgDot(param.Type, "appengine", "Context") { continue } if len(param.Names) == 1 { lastContext = param.Names[0] break } } return } if as, ok := n.(*ast.AssignStmt); ok { if len(as.Lhs) == 1 && len(as.Rhs) == 1 { // If this node is an assignment from an appengine.NewContext invocation, // remember the identifier on the LHS. if isCall(as.Rhs[0], "appengine", "NewContext") { if ident, ok := as.Lhs[0].(*ast.Ident); ok { lastContext = ident return } } // x (=|:=) appengine.Timeout(y, z) // should become // x, _ (=|:=) context.WithTimeout(y, z) if isCall(as.Rhs[0], "appengine", "Timeout") { addImport(f, ctxPackage) as.Lhs = append(as.Lhs, ast.NewIdent("_")) // isCall already did the type checking. sel := as.Rhs[0].(*ast.CallExpr).Fun.(*ast.SelectorExpr) sel.X = ast.NewIdent("context") sel.Sel = ast.NewIdent("WithTimeout") fixed = true return } } return } // If this node is a FuncDecl, we've finished the function, so reset lastContext. if _, ok := n.(*ast.FuncDecl); ok { lastContext = nil return } if call, ok := n.(*ast.CallExpr); ok { if isPkgDot(call.Fun, "appengine", "Datacenter") && len(call.Args) == 0 { insertContext(f, call, lastContext) fixed = true return } if isPkgDot(call.Fun, "taskqueue", "QueueStats") && len(call.Args) == 3 { call.Args = call.Args[:2] // drop last arg fixed = true return } sel, ok := call.Fun.(*ast.SelectorExpr) if !ok { return } if lastContext != nil && refersTo(sel.X, lastContext) && logMethod[sel.Sel.Name] { // c.Errorf(...) // should become // log.Errorf(c, ...) addImport(f, mapPackage("appengine/log")) sel.X = &ast.Ident{ // ast.NewIdent doesn't preserve the position. NamePos: sel.X.Pos(), Name: "log", } insertContext(f, call, lastContext) fixed = true return } } }) // Change any `appengine.Context` to `context.Context`. // Do this in a separate walk because the previous walk // wants to identify "appengine.Context". walk(f, func(n interface{}) { expr, ok := n.(ast.Expr) if ok && isPkgDot(expr, "appengine", "Context") { addImport(f, ctxPackage) // isPkgDot did the type checking. n.(*ast.SelectorExpr).X.(*ast.Ident).Name = "context" fixed = true return } }) // The changes above might remove the need to import "appengine". // Check if it's used, and drop it if it isn't. if fixed && !usesImport(f, mainImp) { deleteImport(f, mainImp) } return fixed } // ctx may be nil. func insertContext(f *ast.File, call *ast.CallExpr, ctx *ast.Ident) { if ctx == nil { // context is unknown, so use a plain "ctx". ctx = ast.NewIdent("ctx") } else { // Create a fresh *ast.Ident so we drop the position information. ctx = ast.NewIdent(ctx.Name) } call.Args = append([]ast.Expr{ctx}, call.Args...) }
aefix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/cmd/aefix/main.go
// 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. package main import ( "bytes" "flag" "fmt" "go/ast" "go/format" "go/parser" "go/scanner" "go/token" "io/ioutil" "os" "os/exec" "path/filepath" "sort" "strings" ) var ( fset = token.NewFileSet() exitCode = 0 ) var allowedRewrites = flag.String("r", "", "restrict the rewrites to this comma-separated list") var forceRewrites = flag.String("force", "", "force these fixes to run even if the code looks updated") var allowed, force map[string]bool var doDiff = flag.Bool("diff", false, "display diffs instead of rewriting files") // enable for debugging fix failures const debug = false // display incorrectly reformatted source and exit func usage() { fmt.Fprintf(os.Stderr, "usage: aefix [-diff] [-r fixname,...] [-force fixname,...] [path ...]\n") flag.PrintDefaults() fmt.Fprintf(os.Stderr, "\nAvailable rewrites are:\n") sort.Sort(byName(fixes)) for _, f := range fixes { fmt.Fprintf(os.Stderr, "\n%s\n", f.name) desc := strings.TrimSpace(f.desc) desc = strings.Replace(desc, "\n", "\n\t", -1) fmt.Fprintf(os.Stderr, "\t%s\n", desc) } os.Exit(2) } func main() { flag.Usage = usage flag.Parse() sort.Sort(byDate(fixes)) if *allowedRewrites != "" { allowed = make(map[string]bool) for _, f := range strings.Split(*allowedRewrites, ",") { allowed[f] = true } } if *forceRewrites != "" { force = make(map[string]bool) for _, f := range strings.Split(*forceRewrites, ",") { force[f] = true } } if flag.NArg() == 0 { if err := processFile("standard input", true); err != nil { report(err) } os.Exit(exitCode) } for i := 0; i < flag.NArg(); i++ { path := flag.Arg(i) switch dir, err := os.Stat(path); { case err != nil: report(err) case dir.IsDir(): walkDir(path) default: if err := processFile(path, false); err != nil { report(err) } } } os.Exit(exitCode) } const parserMode = parser.ParseComments func gofmtFile(f *ast.File) ([]byte, error) { var buf bytes.Buffer if err := format.Node(&buf, fset, f); err != nil { return nil, err } return buf.Bytes(), nil } func processFile(filename string, useStdin bool) error { var f *os.File var err error var fixlog bytes.Buffer if useStdin { f = os.Stdin } else { f, err = os.Open(filename) if err != nil { return err } defer f.Close() } src, err := ioutil.ReadAll(f) if err != nil { return err } file, err := parser.ParseFile(fset, filename, src, parserMode) if err != nil { return err } // Apply all fixes to file. newFile := file fixed := false for _, fix := range fixes { if allowed != nil && !allowed[fix.name] { continue } if fix.f(newFile) { fixed = true fmt.Fprintf(&fixlog, " %s", fix.name) // AST changed. // Print and parse, to update any missing scoping // or position information for subsequent fixers. newSrc, err := gofmtFile(newFile) if err != nil { return err } newFile, err = parser.ParseFile(fset, filename, newSrc, parserMode) if err != nil { if debug { fmt.Printf("%s", newSrc) report(err) os.Exit(exitCode) } return err } } } if !fixed { return nil } fmt.Fprintf(os.Stderr, "%s: fixed %s\n", filename, fixlog.String()[1:]) // Print AST. We did that after each fix, so this appears // redundant, but it is necessary to generate gofmt-compatible // source code in a few cases. The official gofmt style is the // output of the printer run on a standard AST generated by the parser, // but the source we generated inside the loop above is the // output of the printer run on a mangled AST generated by a fixer. newSrc, err := gofmtFile(newFile) if err != nil { return err } if *doDiff { data, err := diff(src, newSrc) if err != nil { return fmt.Errorf("computing diff: %s", err) } fmt.Printf("diff %s fixed/%s\n", filename, filename) os.Stdout.Write(data) return nil } if useStdin { os.Stdout.Write(newSrc) return nil } return ioutil.WriteFile(f.Name(), newSrc, 0) } var gofmtBuf bytes.Buffer func gofmt(n interface{}) string { gofmtBuf.Reset() if err := format.Node(&gofmtBuf, fset, n); err != nil { return "<" + err.Error() + ">" } return gofmtBuf.String() } func report(err error) { scanner.PrintError(os.Stderr, err) exitCode = 2 } func walkDir(path string) { filepath.Walk(path, visitFile) } func visitFile(path string, f os.FileInfo, err error) error { if err == nil && isGoFile(f) { err = processFile(path, false) } if err != nil { report(err) } return nil } func isGoFile(f os.FileInfo) bool { // ignore non-Go files name := f.Name() return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go") } func diff(b1, b2 []byte) (data []byte, err error) { f1, err := ioutil.TempFile("", "go-fix") if err != nil { return nil, err } defer os.Remove(f1.Name()) defer f1.Close() f2, err := ioutil.TempFile("", "go-fix") if err != nil { return nil, err } defer os.Remove(f2.Name()) defer f2.Close() f1.Write(b1) f2.Write(b2) data, err = exec.Command("diff", "-u", f1.Name(), f2.Name()).CombinedOutput() if len(data) > 0 { // diff exits with a non-zero status when the files don't match. // Ignore that failure as long as we get output. err = nil } return }
aefix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/cmd/aefix/typecheck.go
// 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. package main import ( "fmt" "go/ast" "go/token" "os" "reflect" "strings" ) // Partial type checker. // // The fact that it is partial is very important: the input is // an AST and a description of some type information to // assume about one or more packages, but not all the // packages that the program imports. The checker is // expected to do as much as it can with what it has been // given. There is not enough information supplied to do // a full type check, but the type checker is expected to // apply information that can be derived from variable // declarations, function and method returns, and type switches // as far as it can, so that the caller can still tell the types // of expression relevant to a particular fix. // // TODO(rsc,gri): Replace with go/typechecker. // Doing that could be an interesting test case for go/typechecker: // the constraints about working with partial information will // likely exercise it in interesting ways. The ideal interface would // be to pass typecheck a map from importpath to package API text // (Go source code), but for now we use data structures (TypeConfig, Type). // // The strings mostly use gofmt form. // // A Field or FieldList has as its type a comma-separated list // of the types of the fields. For example, the field list // x, y, z int // has type "int, int, int". // The prefix "type " is the type of a type. // For example, given // var x int // type T int // x's type is "int" but T's type is "type int". // mkType inserts the "type " prefix. // getType removes it. // isType tests for it. func mkType(t string) string { return "type " + t } func getType(t string) string { if !isType(t) { return "" } return t[len("type "):] } func isType(t string) bool { return strings.HasPrefix(t, "type ") } // TypeConfig describes the universe of relevant types. // For ease of creation, the types are all referred to by string // name (e.g., "reflect.Value"). TypeByName is the only place // where the strings are resolved. type TypeConfig struct { Type map[string]*Type Var map[string]string Func map[string]string } // typeof returns the type of the given name, which may be of // the form "x" or "p.X". func (cfg *TypeConfig) typeof(name string) string { if cfg.Var != nil { if t := cfg.Var[name]; t != "" { return t } } if cfg.Func != nil { if t := cfg.Func[name]; t != "" { return "func()" + t } } return "" } // Type describes the Fields and Methods of a type. // If the field or method cannot be found there, it is next // looked for in the Embed list. type Type struct { Field map[string]string // map field name to type Method map[string]string // map method name to comma-separated return types (should start with "func ") Embed []string // list of types this type embeds (for extra methods) Def string // definition of named type } // dot returns the type of "typ.name", making its decision // using the type information in cfg. func (typ *Type) dot(cfg *TypeConfig, name string) string { if typ.Field != nil { if t := typ.Field[name]; t != "" { return t } } if typ.Method != nil { if t := typ.Method[name]; t != "" { return t } } for _, e := range typ.Embed { etyp := cfg.Type[e] if etyp != nil { if t := etyp.dot(cfg, name); t != "" { return t } } } return "" } // typecheck type checks the AST f assuming the information in cfg. // It returns two maps with type information: // typeof maps AST nodes to type information in gofmt string form. // assign maps type strings to lists of expressions that were assigned // to values of another type that were assigned to that type. func typecheck(cfg *TypeConfig, f *ast.File) (typeof map[interface{}]string, assign map[string][]interface{}) { typeof = make(map[interface{}]string) assign = make(map[string][]interface{}) cfg1 := &TypeConfig{} *cfg1 = *cfg // make copy so we can add locally copied := false // gather function declarations for _, decl := range f.Decls { fn, ok := decl.(*ast.FuncDecl) if !ok { continue } typecheck1(cfg, fn.Type, typeof, assign) t := typeof[fn.Type] if fn.Recv != nil { // The receiver must be a type. rcvr := typeof[fn.Recv] if !isType(rcvr) { if len(fn.Recv.List) != 1 { continue } rcvr = mkType(gofmt(fn.Recv.List[0].Type)) typeof[fn.Recv.List[0].Type] = rcvr } rcvr = getType(rcvr) if rcvr != "" && rcvr[0] == '*' { rcvr = rcvr[1:] } typeof[rcvr+"."+fn.Name.Name] = t } else { if isType(t) { t = getType(t) } else { t = gofmt(fn.Type) } typeof[fn.Name] = t // Record typeof[fn.Name.Obj] for future references to fn.Name. typeof[fn.Name.Obj] = t } } // gather struct declarations for _, decl := range f.Decls { d, ok := decl.(*ast.GenDecl) if ok { for _, s := range d.Specs { switch s := s.(type) { case *ast.TypeSpec: if cfg1.Type[s.Name.Name] != nil { break } if !copied { copied = true // Copy map lazily: it's time. cfg1.Type = make(map[string]*Type) for k, v := range cfg.Type { cfg1.Type[k] = v } } t := &Type{Field: map[string]string{}} cfg1.Type[s.Name.Name] = t switch st := s.Type.(type) { case *ast.StructType: for _, f := range st.Fields.List { for _, n := range f.Names { t.Field[n.Name] = gofmt(f.Type) } } case *ast.ArrayType, *ast.StarExpr, *ast.MapType: t.Def = gofmt(st) } } } } } typecheck1(cfg1, f, typeof, assign) return typeof, assign } func makeExprList(a []*ast.Ident) []ast.Expr { var b []ast.Expr for _, x := range a { b = append(b, x) } return b } // typecheck1 is the recursive form of typecheck. // It is like typecheck but adds to the information in typeof // instead of allocating a new map. func typecheck1(cfg *TypeConfig, f interface{}, typeof map[interface{}]string, assign map[string][]interface{}) { // set sets the type of n to typ. // If isDecl is true, n is being declared. set := func(n ast.Expr, typ string, isDecl bool) { if typeof[n] != "" || typ == "" { if typeof[n] != typ { assign[typ] = append(assign[typ], n) } return } typeof[n] = typ // If we obtained typ from the declaration of x // propagate the type to all the uses. // The !isDecl case is a cheat here, but it makes // up in some cases for not paying attention to // struct fields. The real type checker will be // more accurate so we won't need the cheat. if id, ok := n.(*ast.Ident); ok && id.Obj != nil && (isDecl || typeof[id.Obj] == "") { typeof[id.Obj] = typ } } // Type-check an assignment lhs = rhs. // If isDecl is true, this is := so we can update // the types of the objects that lhs refers to. typecheckAssign := func(lhs, rhs []ast.Expr, isDecl bool) { if len(lhs) > 1 && len(rhs) == 1 { if _, ok := rhs[0].(*ast.CallExpr); ok { t := split(typeof[rhs[0]]) // Lists should have same length but may not; pair what can be paired. for i := 0; i < len(lhs) && i < len(t); i++ { set(lhs[i], t[i], isDecl) } return } } if len(lhs) == 1 && len(rhs) == 2 { // x = y, ok rhs = rhs[:1] } else if len(lhs) == 2 && len(rhs) == 1 { // x, ok = y lhs = lhs[:1] } // Match as much as we can. for i := 0; i < len(lhs) && i < len(rhs); i++ { x, y := lhs[i], rhs[i] if typeof[y] != "" { set(x, typeof[y], isDecl) } else { set(y, typeof[x], false) } } } expand := func(s string) string { typ := cfg.Type[s] if typ != nil && typ.Def != "" { return typ.Def } return s } // The main type check is a recursive algorithm implemented // by walkBeforeAfter(n, before, after). // Most of it is bottom-up, but in a few places we need // to know the type of the function we are checking. // The before function records that information on // the curfn stack. var curfn []*ast.FuncType before := func(n interface{}) { // push function type on stack switch n := n.(type) { case *ast.FuncDecl: curfn = append(curfn, n.Type) case *ast.FuncLit: curfn = append(curfn, n.Type) } } // After is the real type checker. after := func(n interface{}) { if n == nil { return } if false && reflect.TypeOf(n).Kind() == reflect.Ptr { // debugging trace defer func() { if t := typeof[n]; t != "" { pos := fset.Position(n.(ast.Node).Pos()) fmt.Fprintf(os.Stderr, "%s: typeof[%s] = %s\n", pos, gofmt(n), t) } }() } switch n := n.(type) { case *ast.FuncDecl, *ast.FuncLit: // pop function type off stack curfn = curfn[:len(curfn)-1] case *ast.FuncType: typeof[n] = mkType(joinFunc(split(typeof[n.Params]), split(typeof[n.Results]))) case *ast.FieldList: // Field list is concatenation of sub-lists. t := "" for _, field := range n.List { if t != "" { t += ", " } t += typeof[field] } typeof[n] = t case *ast.Field: // Field is one instance of the type per name. all := "" t := typeof[n.Type] if !isType(t) { // Create a type, because it is typically *T or *p.T // and we might care about that type. t = mkType(gofmt(n.Type)) typeof[n.Type] = t } t = getType(t) if len(n.Names) == 0 { all = t } else { for _, id := range n.Names { if all != "" { all += ", " } all += t typeof[id.Obj] = t typeof[id] = t } } typeof[n] = all case *ast.ValueSpec: // var declaration. Use type if present. if n.Type != nil { t := typeof[n.Type] if !isType(t) { t = mkType(gofmt(n.Type)) typeof[n.Type] = t } t = getType(t) for _, id := range n.Names { set(id, t, true) } } // Now treat same as assignment. typecheckAssign(makeExprList(n.Names), n.Values, true) case *ast.AssignStmt: typecheckAssign(n.Lhs, n.Rhs, n.Tok == token.DEFINE) case *ast.Ident: // Identifier can take its type from underlying object. if t := typeof[n.Obj]; t != "" { typeof[n] = t } case *ast.SelectorExpr: // Field or method. name := n.Sel.Name if t := typeof[n.X]; t != "" { if strings.HasPrefix(t, "*") { t = t[1:] // implicit * } if typ := cfg.Type[t]; typ != nil { if t := typ.dot(cfg, name); t != "" { typeof[n] = t return } } tt := typeof[t+"."+name] if isType(tt) { typeof[n] = getType(tt) return } } // Package selector. if x, ok := n.X.(*ast.Ident); ok && x.Obj == nil { str := x.Name + "." + name if cfg.Type[str] != nil { typeof[n] = mkType(str) return } if t := cfg.typeof(x.Name + "." + name); t != "" { typeof[n] = t return } } case *ast.CallExpr: // make(T) has type T. if isTopName(n.Fun, "make") && len(n.Args) >= 1 { typeof[n] = gofmt(n.Args[0]) return } // new(T) has type *T if isTopName(n.Fun, "new") && len(n.Args) == 1 { typeof[n] = "*" + gofmt(n.Args[0]) return } // Otherwise, use type of function to determine arguments. t := typeof[n.Fun] in, out := splitFunc(t) if in == nil && out == nil { return } typeof[n] = join(out) for i, arg := range n.Args { if i >= len(in) { break } if typeof[arg] == "" { typeof[arg] = in[i] } } case *ast.TypeAssertExpr: // x.(type) has type of x. if n.Type == nil { typeof[n] = typeof[n.X] return } // x.(T) has type T. if t := typeof[n.Type]; isType(t) { typeof[n] = getType(t) } else { typeof[n] = gofmt(n.Type) } case *ast.SliceExpr: // x[i:j] has type of x. typeof[n] = typeof[n.X] case *ast.IndexExpr: // x[i] has key type of x's type. t := expand(typeof[n.X]) if strings.HasPrefix(t, "[") || strings.HasPrefix(t, "map[") { // Lazy: assume there are no nested [] in the array // length or map key type. if i := strings.Index(t, "]"); i >= 0 { typeof[n] = t[i+1:] } } case *ast.StarExpr: // *x for x of type *T has type T when x is an expr. // We don't use the result when *x is a type, but // compute it anyway. t := expand(typeof[n.X]) if isType(t) { typeof[n] = "type *" + getType(t) } else if strings.HasPrefix(t, "*") { typeof[n] = t[len("*"):] } case *ast.UnaryExpr: // &x for x of type T has type *T. t := typeof[n.X] if t != "" && n.Op == token.AND { typeof[n] = "*" + t } case *ast.CompositeLit: // T{...} has type T. typeof[n] = gofmt(n.Type) case *ast.ParenExpr: // (x) has type of x. typeof[n] = typeof[n.X] case *ast.RangeStmt: t := expand(typeof[n.X]) if t == "" { return } var key, value string if t == "string" { key, value = "int", "rune" } else if strings.HasPrefix(t, "[") { key = "int" if i := strings.Index(t, "]"); i >= 0 { value = t[i+1:] } } else if strings.HasPrefix(t, "map[") { if i := strings.Index(t, "]"); i >= 0 { key, value = t[4:i], t[i+1:] } } changed := false if n.Key != nil && key != "" { changed = true set(n.Key, key, n.Tok == token.DEFINE) } if n.Value != nil && value != "" { changed = true set(n.Value, value, n.Tok == token.DEFINE) } // Ugly failure of vision: already type-checked body. // Do it again now that we have that type info. if changed { typecheck1(cfg, n.Body, typeof, assign) } case *ast.TypeSwitchStmt: // Type of variable changes for each case in type switch, // but go/parser generates just one variable. // Repeat type check for each case with more precise // type information. as, ok := n.Assign.(*ast.AssignStmt) if !ok { return } varx, ok := as.Lhs[0].(*ast.Ident) if !ok { return } t := typeof[varx] for _, cas := range n.Body.List { cas := cas.(*ast.CaseClause) if len(cas.List) == 1 { // Variable has specific type only when there is // exactly one type in the case list. if tt := typeof[cas.List[0]]; isType(tt) { tt = getType(tt) typeof[varx] = tt typeof[varx.Obj] = tt typecheck1(cfg, cas.Body, typeof, assign) } } } // Restore t. typeof[varx] = t typeof[varx.Obj] = t case *ast.ReturnStmt: if len(curfn) == 0 { // Probably can't happen. return } f := curfn[len(curfn)-1] res := n.Results if f.Results != nil { t := split(typeof[f.Results]) for i := 0; i < len(res) && i < len(t); i++ { set(res[i], t[i], false) } } } } walkBeforeAfter(f, before, after) } // Convert between function type strings and lists of types. // Using strings makes this a little harder, but it makes // a lot of the rest of the code easier. This will all go away // when we can use go/typechecker directly. // splitFunc splits "func(x,y,z) (a,b,c)" into ["x", "y", "z"] and ["a", "b", "c"]. func splitFunc(s string) (in, out []string) { if !strings.HasPrefix(s, "func(") { return nil, nil } i := len("func(") // index of beginning of 'in' arguments nparen := 0 for j := i; j < len(s); j++ { switch s[j] { case '(': nparen++ case ')': nparen-- if nparen < 0 { // found end of parameter list out := strings.TrimSpace(s[j+1:]) if len(out) >= 2 && out[0] == '(' && out[len(out)-1] == ')' { out = out[1 : len(out)-1] } return split(s[i:j]), split(out) } } } return nil, nil } // joinFunc is the inverse of splitFunc. func joinFunc(in, out []string) string { outs := "" if len(out) == 1 { outs = " " + out[0] } else if len(out) > 1 { outs = " (" + join(out) + ")" } return "func(" + join(in) + ")" + outs } // split splits "int, float" into ["int", "float"] and splits "" into []. func split(s string) []string { out := []string{} i := 0 // current type being scanned is s[i:j]. nparen := 0 for j := 0; j < len(s); j++ { switch s[j] { case ' ': if i == j { i++ } case '(': nparen++ case ')': nparen-- if nparen < 0 { // probably can't happen return nil } case ',': if nparen == 0 { if i < j { out = append(out, s[i:j]) } i = j + 1 } } } if nparen != 0 { // probably can't happen return nil } if i < len(s) { out = append(out, s[i:]) } return out } // join is the inverse of split. func join(x []string) string { return strings.Join(x, ", ") }
aefix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/cmd/aefix/ae_test.go
// Copyright 2016 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 main func init() { addTestCases(aeTests, nil) } var aeTests = []testCase{ // Collection of fixes: // - imports // - appengine.Timeout -> context.WithTimeout // - add ctx arg to appengine.Datacenter // - logging API { Name: "ae.0", In: `package foo import ( "net/http" "time" "appengine" "appengine/datastore" ) func f(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) c = appengine.Timeout(c, 5*time.Second) err := datastore.ErrNoSuchEntity c.Errorf("Something interesting happened: %v", err) _ = appengine.Datacenter() } `, Out: `package foo import ( "context" "net/http" "time" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/datastore" "google.golang.org/appengine/v2/log" ) func f(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) c, _ = context.WithTimeout(c, 5*time.Second) err := datastore.ErrNoSuchEntity log.Errorf(c, "Something interesting happened: %v", err) _ = appengine.Datacenter(c) } `, }, // Updating a function that takes an appengine.Context arg. { Name: "ae.1", In: `package foo import ( "appengine" ) func LogSomething(c2 appengine.Context) { c2.Warningf("Stand back! I'm going to try science!") } `, Out: `package foo import ( "context" "google.golang.org/appengine/v2/log" ) func LogSomething(c2 context.Context) { log.Warningf(c2, "Stand back! I'm going to try science!") } `, }, // Less widely used API changes: // - drop maxTasks arg to taskqueue.QueueStats { Name: "ae.2", In: `package foo import ( "appengine" "appengine/taskqueue" ) func f(ctx appengine.Context) { stats, err := taskqueue.QueueStats(ctx, []string{"one", "two"}, 0) } `, Out: `package foo import ( "context" "google.golang.org/appengine/v2/taskqueue" ) func f(ctx context.Context) { stats, err := taskqueue.QueueStats(ctx, []string{"one", "two"}) } `, }, // Check that the main "appengine" import will not be dropped // if an appengine.Context -> context.Context change happens // but the appengine package is still referenced. { Name: "ae.3", In: `package foo import ( "appengine" "io" ) func f(ctx appengine.Context, w io.Writer) { _ = appengine.IsDevAppServer() } `, Out: `package foo import ( "context" "google.golang.org/appengine/v2" "io" ) func f(ctx context.Context, w io.Writer) { _ = appengine.IsDevAppServer() } `, }, }
image
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/image/image.go
// Copyright 2012 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 image provides image services. package image // import "google.golang.org/appengine/v2/image" import ( "context" "fmt" "net/url" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/image" ) type ServingURLOptions struct { Secure bool // whether the URL should use HTTPS // Size must be between zero and 1600. // If Size is non-zero, a resized version of the image is served, // and Size is the served image's longest dimension. The aspect ratio is preserved. // If Crop is true the image is cropped from the center instead of being resized. Size int Crop bool } // ServingURL returns a URL that will serve an image from Blobstore. func ServingURL(c context.Context, key appengine.BlobKey, opts *ServingURLOptions) (*url.URL, error) { req := &pb.ImagesGetUrlBaseRequest{ BlobKey: (*string)(&key), } if opts != nil && opts.Secure { req.CreateSecureUrl = &opts.Secure } res := &pb.ImagesGetUrlBaseResponse{} if err := internal.Call(c, "images", "GetUrlBase", req, res); err != nil { return nil, err } // The URL may have suffixes added to dynamically resize or crop: // - adding "=s32" will serve the image resized to 32 pixels, preserving the aspect ratio. // - adding "=s32-c" is the same as "=s32" except it will be cropped. u := *res.Url if opts != nil && opts.Size > 0 { u += fmt.Sprintf("=s%d", opts.Size) if opts.Crop { u += "-c" } } return url.Parse(u) } // DeleteServingURL deletes the serving URL for an image. func DeleteServingURL(c context.Context, key appengine.BlobKey) error { req := &pb.ImagesDeleteUrlBaseRequest{ BlobKey: (*string)(&key), } res := &pb.ImagesDeleteUrlBaseResponse{} return internal.Call(c, "images", "DeleteUrlBase", req, res) } func init() { internal.RegisterErrorCodeMap("images", pb.ImagesServiceError_ErrorCode_name) }
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/search/struct_test.go
// Copyright 2023 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 search import ( "reflect" "testing" ) func TestLoadingStruct(t *testing.T) { testCases := []struct { desc string fields []Field meta *DocumentMetadata want interface{} wantErr bool }{ { desc: "Basic struct", fields: []Field{ {Name: "Name", Value: "Gopher"}, {Name: "Legs", Value: float64(4)}, }, want: &struct { Name string Legs float64 }{"Gopher", 4}, }, { desc: "Struct with tags", fields: []Field{ {Name: "Name", Value: "Gopher"}, {Name: "about", Value: "Likes slide rules."}, }, meta: &DocumentMetadata{Facets: []Facet{ {Name: "Legs", Value: float64(4)}, {Name: "Fur", Value: Atom("furry")}, }}, want: &struct { Name string Info string `search:"about"` Legs float64 `search:",facet"` Fuzz Atom `search:"Fur,facet"` }{"Gopher", "Likes slide rules.", 4, Atom("furry")}, }, { desc: "Bad field from tag", want: &struct { AlphaBeta string `search:"αβ"` }{}, wantErr: true, }, { desc: "Ignore missing field", fields: []Field{ {Name: "Meaning", Value: float64(42)}, }, want: &struct{}{}, wantErr: true, }, { desc: "Ignore unsettable field", fields: []Field{ {Name: "meaning", Value: float64(42)}, }, want: &struct{ meaning float64 }{}, // field not populated. wantErr: true, }, { desc: "Error on missing facet", meta: &DocumentMetadata{Facets: []Facet{ {Name: "Set", Value: Atom("yes")}, {Name: "Missing", Value: Atom("no")}, }}, want: &struct { Set Atom `search:",facet"` }{Atom("yes")}, wantErr: true, }, { desc: "Error on unsettable facet", meta: &DocumentMetadata{Facets: []Facet{ {Name: "Set", Value: Atom("yes")}, {Name: "unset", Value: Atom("no")}, }}, want: &struct { Set Atom `search:",facet"` }{Atom("yes")}, wantErr: true, }, { desc: "Error setting ignored field", fields: []Field{ {Name: "Set", Value: "yes"}, {Name: "Ignored", Value: "no"}, }, want: &struct { Set string Ignored string `search:"-"` }{Set: "yes"}, wantErr: true, }, { desc: "Error setting ignored facet", meta: &DocumentMetadata{Facets: []Facet{ {Name: "Set", Value: Atom("yes")}, {Name: "Ignored", Value: Atom("no")}, }}, want: &struct { Set Atom `search:",facet"` Ignored Atom `search:"-,facet"` }{Set: Atom("yes")}, wantErr: true, }, } for _, tt := range testCases { // Make a pointer to an empty version of what want points to. dst := reflect.New(reflect.TypeOf(tt.want).Elem()).Interface() err := loadStructWithMeta(dst, tt.fields, tt.meta) if err != nil != tt.wantErr { t.Errorf("%s: got err %v; want err %t", tt.desc, err, tt.wantErr) continue } if !reflect.DeepEqual(dst, tt.want) { t.Errorf("%s: doesn't match\ngot: %v\nwant: %v", tt.desc, dst, tt.want) } } } func TestSavingStruct(t *testing.T) { testCases := []struct { desc string doc interface{} wantFields []Field wantFacets []Facet }{ { desc: "Basic struct", doc: &struct { Name string Legs float64 }{"Gopher", 4}, wantFields: []Field{ {Name: "Name", Value: "Gopher"}, {Name: "Legs", Value: float64(4)}, }, }, { desc: "Struct with tags", doc: &struct { Name string Info string `search:"about"` Legs float64 `search:",facet"` Fuzz Atom `search:"Fur,facet"` }{"Gopher", "Likes slide rules.", 4, Atom("furry")}, wantFields: []Field{ {Name: "Name", Value: "Gopher"}, {Name: "about", Value: "Likes slide rules."}, }, wantFacets: []Facet{ {Name: "Legs", Value: float64(4)}, {Name: "Fur", Value: Atom("furry")}, }, }, { desc: "Ignore unexported struct fields", doc: &struct { Name string info string Legs float64 `search:",facet"` fuzz Atom `search:",facet"` }{"Gopher", "Likes slide rules.", 4, Atom("furry")}, wantFields: []Field{ {Name: "Name", Value: "Gopher"}, }, wantFacets: []Facet{ {Name: "Legs", Value: float64(4)}, }, }, { desc: "Ignore fields marked -", doc: &struct { Name string Info string `search:"-"` Legs float64 `search:",facet"` Fuzz Atom `search:"-,facet"` }{"Gopher", "Likes slide rules.", 4, Atom("furry")}, wantFields: []Field{ {Name: "Name", Value: "Gopher"}, }, wantFacets: []Facet{ {Name: "Legs", Value: float64(4)}, }, }, } for _, tt := range testCases { fields, meta, err := saveStructWithMeta(tt.doc) if err != nil { t.Errorf("%s: got err %v; want nil", tt.desc, err) continue } if !reflect.DeepEqual(fields, tt.wantFields) { t.Errorf("%s: fields don't match\ngot: %v\nwant: %v", tt.desc, fields, tt.wantFields) } if facets := meta.Facets; !reflect.DeepEqual(facets, tt.wantFacets) { t.Errorf("%s: facets don't match\ngot: %v\nwant: %v", tt.desc, facets, tt.wantFacets) } } }
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/search/search.go
// Copyright 2023 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 search // import "google.golang.org/appengine/v2/search" // TODO: let Put specify the document language: "en", "fr", etc. Also: order_id?? storage?? // TODO: Index.GetAll (or Iterator.GetAll)? // TODO: struct <-> protobuf tests. // TODO: enforce Python's MIN_NUMBER_VALUE and MIN_DATE (which would disallow a zero // time.Time)? _MAXIMUM_STRING_LENGTH? import ( "context" "errors" "fmt" "math" "reflect" "regexp" "strconv" "strings" "time" "unicode/utf8" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/search" ) const maxDocumentsPerPutDelete = 200 var ( // ErrInvalidDocumentType is returned when methods like Put, Get or Next // are passed a dst or src argument of invalid type. ErrInvalidDocumentType = errors.New("search: invalid document type") // ErrNoSuchDocument is returned when no document was found for a given ID. ErrNoSuchDocument = errors.New("search: no such document") // ErrTooManyDocuments is returned when the user passes too many documents to // PutMulti or DeleteMulti. ErrTooManyDocuments = fmt.Errorf("search: too many documents given to put or delete (max is %d)", maxDocumentsPerPutDelete) ) // Atom is a document field whose contents are indexed as a single indivisible // string. type Atom string // HTML is a document field whose contents are indexed as HTML. Only text nodes // are indexed: "foo<b>bar" will be treated as "foobar". type HTML string // validIndexNameOrDocID is the Go equivalent of Python's // _ValidateVisiblePrintableAsciiNotReserved. func validIndexNameOrDocID(s string) bool { if strings.HasPrefix(s, "!") { return false } for _, c := range s { if c < 0x21 || 0x7f <= c { return false } } return true } var ( fieldNameRE = regexp.MustCompile(`^[A-Za-z][A-Za-z0-9_]*$`) languageRE = regexp.MustCompile(`^[a-z]{2}$`) ) // validFieldName is the Go equivalent of Python's _CheckFieldName. It checks // the validity of both field and facet names. func validFieldName(s string) bool { return len(s) <= 500 && fieldNameRE.MatchString(s) } // validDocRank checks that the ranks is in the range [0, 2^31). func validDocRank(r int) bool { return 0 <= r && r <= (1<<31-1) } // validLanguage checks that a language looks like ISO 639-1. func validLanguage(s string) bool { return languageRE.MatchString(s) } // validFloat checks that f is in the range [-2147483647, 2147483647]. func validFloat(f float64) bool { return -(1<<31-1) <= f && f <= (1<<31-1) } // Index is an index of documents. type Index struct { spec pb.IndexSpec } // orderIDEpoch forms the basis for populating OrderId on documents. var orderIDEpoch = time.Date(2011, 1, 1, 0, 0, 0, 0, time.UTC) // Open opens the index with the given name. The index is created if it does // not already exist. // // The name is a human-readable ASCII string. It must contain no whitespace // characters and not start with "!". func Open(name string) (*Index, error) { if !validIndexNameOrDocID(name) { return nil, fmt.Errorf("search: invalid index name %q", name) } return &Index{ spec: pb.IndexSpec{ Name: &name, }, }, nil } // Put saves src to the index. If id is empty, a new ID is allocated by the // service and returned. If id is not empty, any existing index entry for that // ID is replaced. // // The ID is a human-readable ASCII string. It must contain no whitespace // characters and not start with "!". // // src must be a non-nil struct pointer or implement the FieldLoadSaver // interface. func (x *Index) Put(c context.Context, id string, src interface{}) (string, error) { ids, err := x.PutMulti(c, []string{id}, []interface{}{src}) if err != nil { return "", err } return ids[0], nil } // PutMulti is like Put, but is more efficient for adding multiple documents to // the index at once. // // Up to 200 documents can be added at once. ErrTooManyDocuments is returned if // you try to add more. // // ids can either be an empty slice (which means new IDs will be allocated for // each of the documents added) or a slice the same size as srcs. // // The error may be an instance of appengine.MultiError, in which case it will // be the same size as srcs and the individual errors inside will correspond // with the items in srcs. func (x *Index) PutMulti(c context.Context, ids []string, srcs []interface{}) ([]string, error) { if len(ids) != 0 && len(srcs) != len(ids) { return nil, fmt.Errorf("search: PutMulti expects ids and srcs slices of the same length") } if len(srcs) > maxDocumentsPerPutDelete { return nil, ErrTooManyDocuments } docs := make([]*pb.Document, len(srcs)) for i, s := range srcs { var err error docs[i], err = saveDoc(s) if err != nil { return nil, err } if len(ids) != 0 && ids[i] != "" { if !validIndexNameOrDocID(ids[i]) { return nil, fmt.Errorf("search: invalid ID %q", ids[i]) } docs[i].Id = proto.String(ids[i]) } } // spec is modified by Call when applying the current Namespace, so copy it to // avoid retaining the namespace beyond the scope of the Call. spec := x.spec req := &pb.IndexDocumentRequest{ Params: &pb.IndexDocumentParams{ Document: docs, IndexSpec: &spec, }, } res := &pb.IndexDocumentResponse{} if err := internal.Call(c, "search", "IndexDocument", req, res); err != nil { return nil, err } multiErr, hasErr := make(appengine.MultiError, len(res.Status)), false for i, s := range res.Status { if s.GetCode() != pb.SearchServiceError_OK { multiErr[i] = fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail()) hasErr = true } } if hasErr { return res.DocId, multiErr } if len(res.Status) != len(docs) || len(res.DocId) != len(docs) { return nil, fmt.Errorf("search: internal error: wrong number of results (%d Statuses, %d DocIDs, expected %d)", len(res.Status), len(res.DocId), len(docs)) } return res.DocId, nil } // Get loads the document with the given ID into dst. // // The ID is a human-readable ASCII string. It must be non-empty, contain no // whitespace characters and not start with "!". // // dst must be a non-nil struct pointer or implement the FieldLoadSaver // interface. // // ErrFieldMismatch is returned when a field is to be loaded into a different // type than the one it was stored from, or when a field is missing or // unexported in the destination struct. ErrFieldMismatch is only returned if // dst is a struct pointer. It is up to the callee to decide whether this error // is fatal, recoverable, or ignorable. func (x *Index) Get(c context.Context, id string, dst interface{}) error { if id == "" || !validIndexNameOrDocID(id) { return fmt.Errorf("search: invalid ID %q", id) } req := &pb.ListDocumentsRequest{ Params: &pb.ListDocumentsParams{ IndexSpec: &x.spec, StartDocId: proto.String(id), Limit: proto.Int32(1), }, } res := &pb.ListDocumentsResponse{} if err := internal.Call(c, "search", "ListDocuments", req, res); err != nil { return err } if res.Status == nil || res.Status.GetCode() != pb.SearchServiceError_OK { return fmt.Errorf("search: %s: %s", res.Status.GetCode(), res.Status.GetErrorDetail()) } if len(res.Document) != 1 || res.Document[0].GetId() != id { return ErrNoSuchDocument } return loadDoc(dst, res.Document[0], nil) } // Delete deletes a document from the index. func (x *Index) Delete(c context.Context, id string) error { return x.DeleteMulti(c, []string{id}) } // DeleteMulti deletes multiple documents from the index. // // The returned error may be an instance of appengine.MultiError, in which case // it will be the same size as srcs and the individual errors inside will // correspond with the items in srcs. func (x *Index) DeleteMulti(c context.Context, ids []string) error { if len(ids) > maxDocumentsPerPutDelete { return ErrTooManyDocuments } req := &pb.DeleteDocumentRequest{ Params: &pb.DeleteDocumentParams{ DocId: ids, IndexSpec: &x.spec, }, } res := &pb.DeleteDocumentResponse{} if err := internal.Call(c, "search", "DeleteDocument", req, res); err != nil { return err } if len(res.Status) != len(ids) { return fmt.Errorf("search: internal error: wrong number of results (%d, expected %d)", len(res.Status), len(ids)) } multiErr, hasErr := make(appengine.MultiError, len(ids)), false for i, s := range res.Status { if s.GetCode() != pb.SearchServiceError_OK { multiErr[i] = fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail()) hasErr = true } } if hasErr { return multiErr } return nil } // List lists all of the documents in an index. The documents are returned in // increasing ID order. func (x *Index) List(c context.Context, opts *ListOptions) *Iterator { t := &Iterator{ c: c, index: x, count: -1, listInclusive: true, more: moreList, } if opts != nil { t.listStartID = opts.StartID t.limit = opts.Limit t.idsOnly = opts.IDsOnly } return t } func moreList(t *Iterator) error { req := &pb.ListDocumentsRequest{ Params: &pb.ListDocumentsParams{ IndexSpec: &t.index.spec, }, } if t.listStartID != "" { req.Params.StartDocId = &t.listStartID req.Params.IncludeStartDoc = &t.listInclusive } if t.limit > 0 { req.Params.Limit = proto.Int32(int32(t.limit)) } if t.idsOnly { req.Params.KeysOnly = &t.idsOnly } res := &pb.ListDocumentsResponse{} if err := internal.Call(t.c, "search", "ListDocuments", req, res); err != nil { return err } if res.Status == nil || res.Status.GetCode() != pb.SearchServiceError_OK { return fmt.Errorf("search: %s: %s", res.Status.GetCode(), res.Status.GetErrorDetail()) } t.listRes = res.Document t.listStartID, t.listInclusive, t.more = "", false, nil if len(res.Document) != 0 && t.limit <= 0 { if id := res.Document[len(res.Document)-1].GetId(); id != "" { t.listStartID, t.more = id, moreList } } return nil } // ListOptions are the options for listing documents in an index. Passing a nil // *ListOptions is equivalent to using the default values. type ListOptions struct { // StartID is the inclusive lower bound for the ID of the returned // documents. The zero value means all documents will be returned. StartID string // Limit is the maximum number of documents to return. The zero value // indicates no limit. Limit int // IDsOnly indicates that only document IDs should be returned for the list // operation; no document fields are populated. IDsOnly bool } // Search searches the index for the given query. func (x *Index) Search(c context.Context, query string, opts *SearchOptions) *Iterator { t := &Iterator{ c: c, index: x, searchQuery: query, more: moreSearch, } if opts != nil { if opts.Cursor != "" { if opts.Offset != 0 { return errIter("at most one of Cursor and Offset may be specified") } t.searchCursor = proto.String(string(opts.Cursor)) } t.limit = opts.Limit t.fields = opts.Fields t.idsOnly = opts.IDsOnly t.sort = opts.Sort t.exprs = opts.Expressions t.refinements = opts.Refinements t.facetOpts = opts.Facets t.searchOffset = opts.Offset t.countAccuracy = opts.CountAccuracy } return t } func moreSearch(t *Iterator) error { // We use per-result (rather than single/per-page) cursors since this // lets us return a Cursor for every iterator document. The two cursor // types are largely interchangeable: a page cursor is the same as the // last per-result cursor in a given search response. req := &pb.SearchRequest{ Params: &pb.SearchParams{ IndexSpec: &t.index.spec, Query: &t.searchQuery, Cursor: t.searchCursor, CursorType: pb.SearchParams_PER_RESULT.Enum(), FieldSpec: &pb.FieldSpec{ Name: t.fields, }, }, } if t.limit > 0 { req.Params.Limit = proto.Int32(int32(t.limit)) } if t.searchOffset > 0 { req.Params.Offset = proto.Int32(int32(t.searchOffset)) t.searchOffset = 0 } if t.countAccuracy > 0 { req.Params.MatchedCountAccuracy = proto.Int32(int32(t.countAccuracy)) } if t.idsOnly { req.Params.KeysOnly = &t.idsOnly } if t.sort != nil { if err := sortToProto(t.sort, req.Params); err != nil { return err } } if t.refinements != nil { if err := refinementsToProto(t.refinements, req.Params); err != nil { return err } } for _, e := range t.exprs { req.Params.FieldSpec.Expression = append(req.Params.FieldSpec.Expression, &pb.FieldSpec_Expression{ Name: proto.String(e.Name), Expression: proto.String(e.Expr), }) } for _, f := range t.facetOpts { if err := f.setParams(req.Params); err != nil { return fmt.Errorf("bad FacetSearchOption: %v", err) } } // Don't repeat facet search. t.facetOpts = nil res := &pb.SearchResponse{} if err := internal.Call(t.c, "search", "Search", req, res); err != nil { return err } if res.Status == nil || res.Status.GetCode() != pb.SearchServiceError_OK { return fmt.Errorf("search: %s: %s", res.Status.GetCode(), res.Status.GetErrorDetail()) } t.searchRes = res.Result if len(res.FacetResult) > 0 { t.facetRes = res.FacetResult } t.count = int(*res.MatchedCount) if t.limit > 0 { t.more = nil } else { t.more = moreSearch } return nil } // SearchOptions are the options for searching an index. Passing a nil // *SearchOptions is equivalent to using the default values. type SearchOptions struct { // Limit is the maximum number of documents to return. The zero value // indicates no limit. Limit int // IDsOnly indicates that only document IDs should be returned for the search // operation; no document fields are populated. IDsOnly bool // Sort controls the ordering of search results. Sort *SortOptions // Fields specifies which document fields to include in the results. If omitted, // all document fields are returned. No more than 100 fields may be specified. Fields []string // Expressions specifies additional computed fields to add to each returned // document. Expressions []FieldExpression // Facets controls what facet information is returned for these search results. // If no options are specified, no facet results will be returned. Facets []FacetSearchOption // Refinements filters the returned documents by requiring them to contain facets // with specific values. Refinements are applied in conjunction for facets with // different names, and in disjunction otherwise. Refinements []Facet // Cursor causes the results to commence with the first document after // the document associated with the cursor. Cursor Cursor // Offset specifies the number of documents to skip over before returning results. // When specified, Cursor must be nil. Offset int // CountAccuracy specifies the maximum result count that can be expected to // be accurate. If zero, the count accuracy defaults to 20. CountAccuracy int } // Cursor represents an iterator's position. // // The string value of a cursor is web-safe. It can be saved and restored // for later use. type Cursor string // FieldExpression defines a custom expression to evaluate for each result. type FieldExpression struct { // Name is the name to use for the computed field. Name string // Expr is evaluated to provide a custom content snippet for each document. // See https://cloud.google.com/appengine/docs/standard/go/search/options for // the supported expression syntax. Expr string } // FacetSearchOption controls what facet information is returned in search results. type FacetSearchOption interface { setParams(*pb.SearchParams) error } // AutoFacetDiscovery returns a FacetSearchOption which enables automatic facet // discovery for the search. Automatic facet discovery looks for the facets // which appear the most often in the aggregate in the matched documents. // // The maximum number of facets returned is controlled by facetLimit, and the // maximum number of values per facet by facetLimit. A limit of zero indicates // a default limit should be used. func AutoFacetDiscovery(facetLimit, valueLimit int) FacetSearchOption { return &autoFacetOpt{facetLimit, valueLimit} } type autoFacetOpt struct { facetLimit, valueLimit int } const defaultAutoFacetLimit = 10 // As per python runtime search.py. func (o *autoFacetOpt) setParams(params *pb.SearchParams) error { lim := int32(o.facetLimit) if lim == 0 { lim = defaultAutoFacetLimit } params.AutoDiscoverFacetCount = &lim if o.valueLimit > 0 { params.FacetAutoDetectParam = &pb.FacetAutoDetectParam{ ValueLimit: proto.Int32(int32(o.valueLimit)), } } return nil } // FacetDiscovery returns a FacetSearchOption which selects a facet to be // returned with the search results. By default, the most frequently // occurring values for that facet will be returned. However, you can also // specify a list of particular Atoms or specific Ranges to return. func FacetDiscovery(name string, value ...interface{}) FacetSearchOption { return &facetOpt{name, value} } type facetOpt struct { name string values []interface{} } func (o *facetOpt) setParams(params *pb.SearchParams) error { req := &pb.FacetRequest{Name: &o.name} params.IncludeFacet = append(params.IncludeFacet, req) if len(o.values) == 0 { return nil } vtype := reflect.TypeOf(o.values[0]) reqParam := &pb.FacetRequestParam{} for _, v := range o.values { if reflect.TypeOf(v) != vtype { return errors.New("values must all be Atom, or must all be Range") } switch v := v.(type) { case Atom: reqParam.ValueConstraint = append(reqParam.ValueConstraint, string(v)) case Range: rng, err := rangeToProto(v) if err != nil { return fmt.Errorf("invalid range: %v", err) } reqParam.Range = append(reqParam.Range, rng) default: return fmt.Errorf("unsupported value type %T", v) } } req.Params = reqParam return nil } // FacetDocumentDepth returns a FacetSearchOption which controls the number of // documents to be evaluated with preparing facet results. func FacetDocumentDepth(depth int) FacetSearchOption { return facetDepthOpt(depth) } type facetDepthOpt int func (o facetDepthOpt) setParams(params *pb.SearchParams) error { params.FacetDepth = proto.Int32(int32(o)) return nil } // FacetResult represents the number of times a particular facet and value // appeared in the documents matching a search request. type FacetResult struct { Facet // Count is the number of times this specific facet and value appeared in the // matching documents. Count int } // Range represents a numeric range with inclusive start and exclusive end. // Start may be specified as math.Inf(-1) to indicate there is no minimum // value, and End may similarly be specified as math.Inf(1); at least one of // Start or End must be a finite number. type Range struct { Start, End float64 } var ( negInf = math.Inf(-1) posInf = math.Inf(1) ) // AtLeast returns a Range matching any value greater than, or equal to, min. func AtLeast(min float64) Range { return Range{Start: min, End: posInf} } // LessThan returns a Range matching any value less than max. func LessThan(max float64) Range { return Range{Start: negInf, End: max} } // SortOptions control the ordering and scoring of search results. type SortOptions struct { // Expressions is a slice of expressions representing a multi-dimensional // sort. Expressions []SortExpression // Scorer, when specified, will cause the documents to be scored according to // search term frequency. Scorer Scorer // Limit is the maximum number of objects to score and/or sort. Limit cannot // be more than 10,000. The zero value indicates a default limit. Limit int } // SortExpression defines a single dimension for sorting a document. type SortExpression struct { // Expr is evaluated to provide a sorting value for each document. // See https://cloud.google.com/appengine/docs/standard/go/search/options for // the supported expression syntax. Expr string // Reverse causes the documents to be sorted in ascending order. Reverse bool // The default value to use when no field is present or the expresion // cannot be calculated for a document. For text sorts, Default must // be of type string; for numeric sorts, float64. Default interface{} } // A Scorer defines how a document is scored. type Scorer interface { toProto(*pb.ScorerSpec) } type enumScorer struct { enum pb.ScorerSpec_Scorer } func (e enumScorer) toProto(spec *pb.ScorerSpec) { spec.Scorer = e.enum.Enum() } var ( // MatchScorer assigns a score based on term frequency in a document. MatchScorer Scorer = enumScorer{pb.ScorerSpec_MATCH_SCORER} // RescoringMatchScorer assigns a score based on the quality of the query // match. It is similar to a MatchScorer but uses a more complex scoring // algorithm based on match term frequency and other factors like field type. // Please be aware that this algorithm is continually refined and can change // over time without notice. This means that the ordering of search results // that use this scorer can also change without notice. RescoringMatchScorer Scorer = enumScorer{pb.ScorerSpec_RESCORING_MATCH_SCORER} ) func sortToProto(sort *SortOptions, params *pb.SearchParams) error { for _, e := range sort.Expressions { spec := &pb.SortSpec{ SortExpression: proto.String(e.Expr), } if e.Reverse { spec.SortDescending = proto.Bool(false) } if e.Default != nil { switch d := e.Default.(type) { case float64: spec.DefaultValueNumeric = &d case string: spec.DefaultValueText = &d default: return fmt.Errorf("search: invalid Default type %T for expression %q", d, e.Expr) } } params.SortSpec = append(params.SortSpec, spec) } spec := &pb.ScorerSpec{} if sort.Limit > 0 { spec.Limit = proto.Int32(int32(sort.Limit)) params.ScorerSpec = spec } if sort.Scorer != nil { sort.Scorer.toProto(spec) params.ScorerSpec = spec } return nil } func refinementsToProto(refinements []Facet, params *pb.SearchParams) error { for _, r := range refinements { ref := &pb.FacetRefinement{ Name: proto.String(r.Name), } switch v := r.Value.(type) { case Atom: ref.Value = proto.String(string(v)) case Range: rng, err := rangeToProto(v) if err != nil { return fmt.Errorf("search: refinement for facet %q: %v", r.Name, err) } // Unfortunately there are two identical messages for identify Facet ranges. ref.Range = &pb.FacetRefinement_Range{Start: rng.Start, End: rng.End} default: return fmt.Errorf("search: unsupported refinement for facet %q of type %T", r.Name, v) } params.FacetRefinement = append(params.FacetRefinement, ref) } return nil } func rangeToProto(r Range) (*pb.FacetRange, error) { rng := &pb.FacetRange{} if r.Start != negInf { if !validFloat(r.Start) { return nil, errors.New("invalid value for Start") } rng.Start = proto.String(strconv.FormatFloat(r.Start, 'e', -1, 64)) } else if r.End == posInf { return nil, errors.New("either Start or End must be finite") } if r.End != posInf { if !validFloat(r.End) { return nil, errors.New("invalid value for End") } rng.End = proto.String(strconv.FormatFloat(r.End, 'e', -1, 64)) } return rng, nil } func protoToRange(rng *pb.FacetRefinement_Range) Range { r := Range{Start: negInf, End: posInf} if x, err := strconv.ParseFloat(rng.GetStart(), 64); err != nil { r.Start = x } if x, err := strconv.ParseFloat(rng.GetEnd(), 64); err != nil { r.End = x } return r } // Iterator is the result of searching an index for a query or listing an // index. type Iterator struct { c context.Context index *Index err error listRes []*pb.Document listStartID string listInclusive bool searchRes []*pb.SearchResult facetRes []*pb.FacetResult searchQuery string searchCursor *string searchOffset int sort *SortOptions fields []string exprs []FieldExpression refinements []Facet facetOpts []FacetSearchOption more func(*Iterator) error count int countAccuracy int limit int // items left to return; 0 for unlimited. idsOnly bool } // errIter returns an iterator that only returns the given error. func errIter(err string) *Iterator { return &Iterator{ err: errors.New(err), } } // Done is returned when a query iteration has completed. var Done = errors.New("search: query has no more results") // Count returns an approximation of the number of documents matched by the // query. It is only valid to call for iterators returned by Search. func (t *Iterator) Count() int { return t.count } // fetchMore retrieves more results, if there are no errors or pending results. func (t *Iterator) fetchMore() { if t.err == nil && len(t.listRes)+len(t.searchRes) == 0 && t.more != nil { t.err = t.more(t) } } // Next returns the ID of the next result. When there are no more results, // Done is returned as the error. // // dst must be a non-nil struct pointer, implement the FieldLoadSaver // interface, or be a nil interface value. If a non-nil dst is provided, it // will be filled with the indexed fields. dst is ignored if this iterator was // created with an IDsOnly option. func (t *Iterator) Next(dst interface{}) (string, error) { t.fetchMore() if t.err != nil { return "", t.err } var doc *pb.Document var exprs []*pb.Field switch { case len(t.listRes) != 0: doc = t.listRes[0] t.listRes = t.listRes[1:] case len(t.searchRes) != 0: doc = t.searchRes[0].Document exprs = t.searchRes[0].Expression t.searchCursor = t.searchRes[0].Cursor t.searchRes = t.searchRes[1:] default: return "", Done } if doc == nil { return "", errors.New("search: internal error: no document returned") } if !t.idsOnly && dst != nil { if err := loadDoc(dst, doc, exprs); err != nil { return "", err } } return doc.GetId(), nil } // Cursor returns the cursor associated with the current document (that is, // the document most recently returned by a call to Next). // // Passing this cursor in a future call to Search will cause those results // to commence with the first document after the current document. func (t *Iterator) Cursor() Cursor { if t.searchCursor == nil { return "" } return Cursor(*t.searchCursor) } // Facets returns the facets found within the search results, if any facets // were requested in the SearchOptions. func (t *Iterator) Facets() ([][]FacetResult, error) { t.fetchMore() if t.err != nil && t.err != Done { return nil, t.err } var facets [][]FacetResult for _, f := range t.facetRes { fres := make([]FacetResult, 0, len(f.Value)) for _, v := range f.Value { ref := v.Refinement facet := FacetResult{ Facet: Facet{Name: ref.GetName()}, Count: int(v.GetCount()), } if ref.Value != nil { facet.Value = Atom(*ref.Value) } else { facet.Value = protoToRange(ref.Range) } fres = append(fres, facet) } facets = append(facets, fres) } return facets, nil } // saveDoc converts from a struct pointer or // FieldLoadSaver/FieldMetadataLoadSaver to the Document protobuf. func saveDoc(src interface{}) (*pb.Document, error) { var err error var fields []Field var meta *DocumentMetadata switch x := src.(type) { case FieldLoadSaver: fields, meta, err = x.Save() default: fields, meta, err = saveStructWithMeta(src) } if err != nil { return nil, err } fieldsProto, err := fieldsToProto(fields) if err != nil { return nil, err } d := &pb.Document{ Field: fieldsProto, OrderId: proto.Int32(int32(time.Since(orderIDEpoch).Seconds())), OrderIdSource: pb.Document_DEFAULTED.Enum(), } if meta != nil { if meta.Rank != 0 { if !validDocRank(meta.Rank) { return nil, fmt.Errorf("search: invalid rank %d, must be [0, 2^31)", meta.Rank) } *d.OrderId = int32(meta.Rank) d.OrderIdSource = pb.Document_SUPPLIED.Enum() } if len(meta.Facets) > 0 { facets, err := facetsToProto(meta.Facets) if err != nil { return nil, err } d.Facet = facets } } return d, nil } func fieldsToProto(src []Field) ([]*pb.Field, error) { // Maps to catch duplicate time or numeric fields. timeFields, numericFields := make(map[string]bool), make(map[string]bool) dst := make([]*pb.Field, 0, len(src)) for _, f := range src { if !validFieldName(f.Name) { return nil, fmt.Errorf("search: invalid field name %q", f.Name) } fieldValue := &pb.FieldValue{} switch x := f.Value.(type) { case string: fieldValue.Type = pb.FieldValue_TEXT.Enum() fieldValue.StringValue = proto.String(x) case Atom: fieldValue.Type = pb.FieldValue_ATOM.Enum() fieldValue.StringValue = proto.String(string(x)) case HTML: fieldValue.Type = pb.FieldValue_HTML.Enum() fieldValue.StringValue = proto.String(string(x)) case time.Time: if timeFields[f.Name] { return nil, fmt.Errorf("search: duplicate time field %q", f.Name) } timeFields[f.Name] = true fieldValue.Type = pb.FieldValue_DATE.Enum() fieldValue.StringValue = proto.String(strconv.FormatInt(x.UnixNano()/1e6, 10)) case float64: if numericFields[f.Name] { return nil, fmt.Errorf("search: duplicate numeric field %q", f.Name) } if !validFloat(x) { return nil, fmt.Errorf("search: numeric field %q with invalid value %f", f.Name, x) } numericFields[f.Name] = true fieldValue.Type = pb.FieldValue_NUMBER.Enum() fieldValue.StringValue = proto.String(strconv.FormatFloat(x, 'e', -1, 64)) case appengine.GeoPoint: if !x.Valid() { return nil, fmt.Errorf( "search: GeoPoint field %q with invalid value %v", f.Name, x) } fieldValue.Type = pb.FieldValue_GEO.Enum() fieldValue.Geo = &pb.FieldValue_Geo{ Lat: proto.Float64(x.Lat), Lng: proto.Float64(x.Lng), } default: return nil, fmt.Errorf("search: unsupported field type: %v", reflect.TypeOf(f.Value)) } if f.Language != "" { switch f.Value.(type) { case string, HTML: if !validLanguage(f.Language) { return nil, fmt.Errorf("search: invalid language for field %q: %q", f.Name, f.Language) } fieldValue.Language = proto.String(f.Language) default: return nil, fmt.Errorf("search: setting language not supported for field %q of type %T", f.Name, f.Value) } } if p := fieldValue.StringValue; p != nil && !utf8.ValidString(*p) { return nil, fmt.Errorf("search: %q field is invalid UTF-8: %q", f.Name, *p) } dst = append(dst, &pb.Field{ Name: proto.String(f.Name), Value: fieldValue, }) } return dst, nil } func facetsToProto(src []Facet) ([]*pb.Facet, error) { dst := make([]*pb.Facet, 0, len(src)) for _, f := range src { if !validFieldName(f.Name) { return nil, fmt.Errorf("search: invalid facet name %q", f.Name) } facetValue := &pb.FacetValue{} switch x := f.Value.(type) { case Atom: if !utf8.ValidString(string(x)) { return nil, fmt.Errorf("search: %q facet is invalid UTF-8: %q", f.Name, x) } facetValue.Type = pb.FacetValue_ATOM.Enum() facetValue.StringValue = proto.String(string(x)) case float64: if !validFloat(x) { return nil, fmt.Errorf("search: numeric facet %q with invalid value %f", f.Name, x) } facetValue.Type = pb.FacetValue_NUMBER.Enum() facetValue.StringValue = proto.String(strconv.FormatFloat(x, 'e', -1, 64)) default: return nil, fmt.Errorf("search: unsupported facet type: %v", reflect.TypeOf(f.Value)) } dst = append(dst, &pb.Facet{ Name: proto.String(f.Name), Value: facetValue, }) } return dst, nil } // loadDoc converts from protobufs to a struct pointer or // FieldLoadSaver/FieldMetadataLoadSaver. The src param provides the document's // stored fields and facets, and any document metadata. An additional slice of // fields, exprs, may optionally be provided to contain any derived expressions // requested by the developer. func loadDoc(dst interface{}, src *pb.Document, exprs []*pb.Field) (err error) { fields, err := protoToFields(src.Field) if err != nil { return err } facets, err := protoToFacets(src.Facet) if err != nil { return err } if len(exprs) > 0 { exprFields, err := protoToFields(exprs) if err != nil { return err } // Mark each field as derived. for i := range exprFields { exprFields[i].Derived = true } fields = append(fields, exprFields...) } meta := &DocumentMetadata{ Rank: int(src.GetOrderId()), Facets: facets, } switch x := dst.(type) { case FieldLoadSaver: return x.Load(fields, meta) default: return loadStructWithMeta(dst, fields, meta) } } func protoToFields(fields []*pb.Field) ([]Field, error) { dst := make([]Field, 0, len(fields)) for _, field := range fields { fieldValue := field.GetValue() f := Field{ Name: field.GetName(), } switch fieldValue.GetType() { case pb.FieldValue_TEXT: f.Value = fieldValue.GetStringValue() f.Language = fieldValue.GetLanguage() case pb.FieldValue_ATOM: f.Value = Atom(fieldValue.GetStringValue()) case pb.FieldValue_HTML: f.Value = HTML(fieldValue.GetStringValue()) f.Language = fieldValue.GetLanguage() case pb.FieldValue_DATE: sv := fieldValue.GetStringValue() millis, err := strconv.ParseInt(sv, 10, 64) if err != nil { return nil, fmt.Errorf("search: internal error: bad time.Time encoding %q: %v", sv, err) } f.Value = time.Unix(0, millis*1e6) case pb.FieldValue_NUMBER: sv := fieldValue.GetStringValue() x, err := strconv.ParseFloat(sv, 64) if err != nil { return nil, err } f.Value = x case pb.FieldValue_GEO: geoValue := fieldValue.GetGeo() geoPoint := appengine.GeoPoint{geoValue.GetLat(), geoValue.GetLng()} if !geoPoint.Valid() { return nil, fmt.Errorf("search: internal error: invalid GeoPoint encoding: %v", geoPoint) } f.Value = geoPoint default: return nil, fmt.Errorf("search: internal error: unknown data type %s", fieldValue.GetType()) } dst = append(dst, f) } return dst, nil } func protoToFacets(facets []*pb.Facet) ([]Facet, error) { if len(facets) == 0 { return nil, nil } dst := make([]Facet, 0, len(facets)) for _, facet := range facets { facetValue := facet.GetValue() f := Facet{ Name: facet.GetName(), } switch facetValue.GetType() { case pb.FacetValue_ATOM: f.Value = Atom(facetValue.GetStringValue()) case pb.FacetValue_NUMBER: sv := facetValue.GetStringValue() x, err := strconv.ParseFloat(sv, 64) if err != nil { return nil, err } f.Value = x default: return nil, fmt.Errorf("search: internal error: unknown data type %s", facetValue.GetType()) } dst = append(dst, f) } return dst, nil } func namespaceMod(m proto.Message, namespace string) { set := func(s **string) { if *s == nil { *s = &namespace } } switch m := m.(type) { case *pb.IndexDocumentRequest: set(&m.Params.IndexSpec.Namespace) case *pb.ListDocumentsRequest: set(&m.Params.IndexSpec.Namespace) case *pb.DeleteDocumentRequest: set(&m.Params.IndexSpec.Namespace) case *pb.SearchRequest: set(&m.Params.IndexSpec.Namespace) } } func init() { internal.RegisterErrorCodeMap("search", pb.SearchServiceError_ErrorCode_name) internal.NamespaceMods["search"] = namespaceMod }
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/search/doc.go
// Copyright 2023 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 search provides a client for App Engine's search service. # Basic Operations Indexes contain documents. Each index is identified by its name: a human-readable ASCII string. Within an index, documents are associated with an ID, which is also a human-readable ASCII string. A document's contents are a mapping from case-sensitive field names to values. Valid types for field values are: - string, - search.Atom, - search.HTML, - time.Time (stored with millisecond precision), - float64 (value between -2,147,483,647 and 2,147,483,647 inclusive), - appengine.GeoPoint. The Get and Put methods on an Index load and save a document. A document's contents are typically represented by a struct pointer. Example code: type Doc struct { Author string Comment string Creation time.Time } index, err := search.Open("comments") if err != nil { return err } newID, err := index.Put(ctx, "", &Doc{ Author: "gopher", Comment: "the truth of the matter", Creation: time.Now(), }) if err != nil { return err } A single document can be retrieved by its ID. Pass a destination struct to Get to hold the resulting document. var doc Doc err := index.Get(ctx, id, &doc) if err != nil { return err } # Search and Listing Documents Indexes have two methods for retrieving multiple documents at once: Search and List. Searching an index for a query will result in an iterator. As with an iterator from package datastore, pass a destination struct to Next to decode the next result. Next will return Done when the iterator is exhausted. for t := index.Search(ctx, "Comment:truth", nil); ; { var doc Doc id, err := t.Next(&doc) if err == search.Done { break } if err != nil { return err } fmt.Fprintf(w, "%s -> %#v\n", id, doc) } Search takes a string query to determine which documents to return. The query can be simple, such as a single word to match, or complex. The query language is described at https://cloud.google.com/appengine/docs/standard/go/search/query_strings Search also takes an optional SearchOptions struct which gives much more control over how results are calculated and returned. Call List to iterate over all documents in an index. for t := index.List(ctx, nil); ; { var doc Doc id, err := t.Next(&doc) if err == search.Done { break } if err != nil { return err } fmt.Fprintf(w, "%s -> %#v\n", id, doc) } # Fields and Facets A document's contents can be represented by a variety of types. These are typically struct pointers, but they can also be represented by any type implementing the FieldLoadSaver interface. The FieldLoadSaver allows metadata to be set for the document with the DocumentMetadata type. Struct pointers are more strongly typed and are easier to use; FieldLoadSavers are more flexible. A document's contents can be expressed in two ways: fields and facets. Fields are the most common way of providing content for documents. Fields can store data in multiple types and can be matched in searches using query strings. Facets provide a way to attach categorical information to a document. The only valid types for facets are search.Atom and float64. Facets allow search results to contain summaries of the categories matched in a search, and to restrict searches to only match against specific categories. By default, for struct pointers, all of the struct fields are used as document fields, and the field name used is the same as on the struct (and hence must start with an upper case letter). Struct fields may have a `search:"name,options"` tag. The name must start with a letter and be composed only of word characters. A "-" tag name means that the field will be ignored. If options is "facet" then the struct field will be used as a document facet. If options is "" then the comma may be omitted. There are no other recognized options. Example code: // A and B are renamed to a and b. // A, C and I are facets. // D's tag is equivalent to having no tag at all (E). // F and G are ignored entirely by the search package. // I has tag information for both the search and json packages. type TaggedStruct struct { A float64 `search:"a,facet"` B float64 `search:"b"` C float64 `search:",facet"` D float64 `search:""` E float64 F float64 `search:"-"` G float64 `search:"-,facet"` I float64 `search:",facet" json:"i"` } # The FieldLoadSaver Interface A document's contents can also be represented by any type that implements the FieldLoadSaver interface. This type may be a struct pointer, but it does not have to be. The search package will call Load when loading the document's contents, and Save when saving them. In addition to a slice of Fields, the Load and Save methods also use the DocumentMetadata type to provide additional information about a document (such as its Rank, or set of Facets). Possible uses for this interface include deriving non-stored fields, verifying fields or setting specific languages for string and HTML fields. Example code: type CustomFieldsExample struct { // Item's title and which language it is in. Title string Lang string // Mass, in grams. Mass int } func (x *CustomFieldsExample) Load(fields []search.Field, meta *search.DocumentMetadata) error { // Load the title field, failing if any other field is found. for _, f := range fields { if f.Name != "title" { return fmt.Errorf("unknown field %q", f.Name) } s, ok := f.Value.(string) if !ok { return fmt.Errorf("unsupported type %T for field %q", f.Value, f.Name) } x.Title = s x.Lang = f.Language } // Load the mass facet, failing if any other facet is found. for _, f := range meta.Facets { if f.Name != "mass" { return fmt.Errorf("unknown facet %q", f.Name) } m, ok := f.Value.(float64) if !ok { return fmt.Errorf("unsupported type %T for facet %q", f.Value, f.Name) } x.Mass = int(m) } return nil } func (x *CustomFieldsExample) Save() ([]search.Field, *search.DocumentMetadata, error) { fields := []search.Field{ {Name: "title", Value: x.Title, Language: x.Lang}, } meta := &search.DocumentMetadata{ Facets: { {Name: "mass", Value: float64(x.Mass)}, }, } return fields, meta, nil } */ package search
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/search/field.go
// Copyright 2023 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 search // Field is a name/value pair. A search index's document can be loaded and // saved as a sequence of Fields. type Field struct { // Name is the field name. A valid field name matches /[A-Za-z][A-Za-z0-9_]*/. Name string // Value is the field value. The valid types are: // - string, // - search.Atom, // - search.HTML, // - time.Time (stored with millisecond precision), // - float64, // - GeoPoint. Value interface{} // Language is a two-letter ISO 639-1 code for the field's language, // defaulting to "en" if nothing is specified. It may only be specified for // fields of type string and search.HTML. Language string // Derived marks fields that were calculated as a result of a // FieldExpression provided to Search. This field is ignored when saving a // document. Derived bool } // Facet is a name/value pair which is used to add categorical information to a // document. type Facet struct { // Name is the facet name. A valid facet name matches /[A-Za-z][A-Za-z0-9_]*/. // A facet name cannot be longer than 500 characters. Name string // Value is the facet value. // // When being used in documents (for example, in // DocumentMetadata.Facets), the valid types are: // - search.Atom, // - float64. // // When being used in SearchOptions.Refinements or being returned // in FacetResult, the valid types are: // - search.Atom, // - search.Range. Value interface{} } // DocumentMetadata is a struct containing information describing a given document. type DocumentMetadata struct { // Rank is an integer specifying the order the document will be returned in // search results. If zero, the rank will be set to the number of seconds since // 2011-01-01 00:00:00 UTC when being Put into an index. Rank int // Facets is the set of facets for this document. Facets []Facet } // FieldLoadSaver can be converted from and to a slice of Fields // with additional document metadata. type FieldLoadSaver interface { Load([]Field, *DocumentMetadata) error Save() ([]Field, *DocumentMetadata, error) } // FieldList converts a []Field to implement FieldLoadSaver. type FieldList []Field // Load loads all of the provided fields into l. // It does not first reset *l to an empty slice. func (l *FieldList) Load(f []Field, _ *DocumentMetadata) error { *l = append(*l, f...) return nil } // Save returns all of l's fields as a slice of Fields. func (l *FieldList) Save() ([]Field, *DocumentMetadata, error) { return *l, nil, nil } var _ FieldLoadSaver = (*FieldList)(nil)
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/search/search_test.go
// Copyright 2023 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 search import ( "errors" "fmt" "reflect" "strings" "testing" "time" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal/aetesting" pb "google.golang.org/appengine/v2/internal/search" ) type TestDoc struct { String string Atom Atom HTML HTML Float float64 Location appengine.GeoPoint Time time.Time } type FieldListWithMeta struct { Fields FieldList Meta *DocumentMetadata } func (f *FieldListWithMeta) Load(fields []Field, meta *DocumentMetadata) error { f.Meta = meta return f.Fields.Load(fields, nil) } func (f *FieldListWithMeta) Save() ([]Field, *DocumentMetadata, error) { fields, _, err := f.Fields.Save() return fields, f.Meta, err } // Assert that FieldListWithMeta satisfies FieldLoadSaver var _ FieldLoadSaver = &FieldListWithMeta{} var ( float = 3.14159 floatOut = "3.14159e+00" latitude = 37.3894 longitude = 122.0819 testGeo = appengine.GeoPoint{latitude, longitude} testString = "foo<b>bar" testTime = time.Unix(1337324400, 0) testTimeOut = "1337324400000" searchMeta = &DocumentMetadata{ Rank: 42, } searchDoc = TestDoc{ String: testString, Atom: Atom(testString), HTML: HTML(testString), Float: float, Location: testGeo, Time: testTime, } searchFields = FieldList{ Field{Name: "String", Value: testString}, Field{Name: "Atom", Value: Atom(testString)}, Field{Name: "HTML", Value: HTML(testString)}, Field{Name: "Float", Value: float}, Field{Name: "Location", Value: testGeo}, Field{Name: "Time", Value: testTime}, } // searchFieldsWithLang is a copy of the searchFields with the Language field // set on text/HTML Fields. searchFieldsWithLang = FieldList{} protoFields = []*pb.Field{ newStringValueField("String", testString, pb.FieldValue_TEXT), newStringValueField("Atom", testString, pb.FieldValue_ATOM), newStringValueField("HTML", testString, pb.FieldValue_HTML), newStringValueField("Float", floatOut, pb.FieldValue_NUMBER), { Name: proto.String("Location"), Value: &pb.FieldValue{ Geo: &pb.FieldValue_Geo{ Lat: proto.Float64(latitude), Lng: proto.Float64(longitude), }, Type: pb.FieldValue_GEO.Enum(), }, }, newStringValueField("Time", testTimeOut, pb.FieldValue_DATE), } ) func init() { for _, f := range searchFields { if f.Name == "String" || f.Name == "HTML" { f.Language = "en" } searchFieldsWithLang = append(searchFieldsWithLang, f) } } func newStringValueField(name, value string, valueType pb.FieldValue_ContentType) *pb.Field { return &pb.Field{ Name: proto.String(name), Value: &pb.FieldValue{ StringValue: proto.String(value), Type: valueType.Enum(), }, } } func newFacet(name, value string, valueType pb.FacetValue_ContentType) *pb.Facet { return &pb.Facet{ Name: proto.String(name), Value: &pb.FacetValue{ StringValue: proto.String(value), Type: valueType.Enum(), }, } } func TestValidIndexNameOrDocID(t *testing.T) { testCases := []struct { s string want bool }{ {"", true}, {"!", false}, {"$", true}, {"!bad", false}, {"good!", true}, {"alsoGood", true}, {"has spaces", false}, {"is_inva\xffid_UTF-8", false}, {"is_non-ASCïI", false}, {"underscores_are_ok", true}, } for _, tc := range testCases { if got := validIndexNameOrDocID(tc.s); got != tc.want { t.Errorf("%q: got %v, want %v", tc.s, got, tc.want) } } } func TestLoadDoc(t *testing.T) { got, want := TestDoc{}, searchDoc if err := loadDoc(&got, &pb.Document{Field: protoFields}, nil); err != nil { t.Fatalf("loadDoc: %v", err) } if got != want { t.Errorf("loadDoc: got %v, wanted %v", got, want) } } func TestSaveDoc(t *testing.T) { got, err := saveDoc(&searchDoc) if err != nil { t.Fatalf("saveDoc: %v", err) } want := protoFields if !reflect.DeepEqual(got.Field, want) { t.Errorf("\ngot %v\nwant %v", got, want) } } func TestSaveDocUsesDefaultedRankIfNotSpecified(t *testing.T) { got, err := saveDoc(&searchDoc) if err != nil { t.Fatalf("saveDoc: %v", err) } orderIdSource := got.GetOrderIdSource() if orderIdSource != pb.Document_DEFAULTED { t.Errorf("OrderIdSource: got %v, wanted DEFAULTED", orderIdSource) } } func TestLoadFieldList(t *testing.T) { var got FieldList want := searchFieldsWithLang if err := loadDoc(&got, &pb.Document{Field: protoFields}, nil); err != nil { t.Fatalf("loadDoc: %v", err) } if !reflect.DeepEqual(got, want) { t.Errorf("\ngot %v\nwant %v", got, want) } } func TestLangFields(t *testing.T) { fl := &FieldList{ {Name: "Foo", Value: "I am English", Language: "en"}, {Name: "Bar", Value: "私は日本人だ", Language: "ja"}, } var got FieldList doc, err := saveDoc(fl) if err != nil { t.Fatalf("saveDoc: %v", err) } if err := loadDoc(&got, doc, nil); err != nil { t.Fatalf("loadDoc: %v", err) } if want := fl; !reflect.DeepEqual(&got, want) { t.Errorf("got %v\nwant %v", got, want) } } func TestSaveFieldList(t *testing.T) { got, err := saveDoc(&searchFields) if err != nil { t.Fatalf("saveDoc: %v", err) } want := protoFields if !reflect.DeepEqual(got.Field, want) { t.Errorf("\ngot %v\nwant %v", got, want) } } func TestLoadFieldAndExprList(t *testing.T) { var got, want FieldList for i, f := range searchFieldsWithLang { f.Derived = (i >= 2) // First 2 elements are "fields", next are "expressions". want = append(want, f) } doc, expr := &pb.Document{Field: protoFields[:2]}, protoFields[2:] if err := loadDoc(&got, doc, expr); err != nil { t.Fatalf("loadDoc: %v", err) } if !reflect.DeepEqual(got, want) { t.Errorf("got %v\nwant %v", got, want) } } func TestLoadMeta(t *testing.T) { var got FieldListWithMeta want := FieldListWithMeta{ Meta: searchMeta, Fields: searchFieldsWithLang, } doc := &pb.Document{ Field: protoFields, OrderId: proto.Int32(42), OrderIdSource: pb.Document_SUPPLIED.Enum(), } if err := loadDoc(&got, doc, nil); err != nil { t.Fatalf("loadDoc: %v", err) } if !reflect.DeepEqual(got, want) { t.Errorf("\ngot %v\nwant %v", got, want) } } func TestSaveMeta(t *testing.T) { got, err := saveDoc(&FieldListWithMeta{ Meta: searchMeta, Fields: searchFields, }) if err != nil { t.Fatalf("saveDoc: %v", err) } want := &pb.Document{ Field: protoFields, OrderId: proto.Int32(42), OrderIdSource: pb.Document_SUPPLIED.Enum(), } if !proto.Equal(got, want) { t.Errorf("\ngot %v\nwant %v", got, want) } } func TestSaveMetaWithDefaultedRank(t *testing.T) { metaWithoutRank := &DocumentMetadata{ Rank: 0, } got, err := saveDoc(&FieldListWithMeta{ Meta: metaWithoutRank, Fields: searchFields, }) if err != nil { t.Fatalf("saveDoc: %v", err) } want := &pb.Document{ Field: protoFields, OrderId: got.OrderId, OrderIdSource: pb.Document_DEFAULTED.Enum(), } if !proto.Equal(got, want) { t.Errorf("\ngot %v\nwant %v", got, want) } } func TestSaveWithoutMetaUsesDefaultedRank(t *testing.T) { got, err := saveDoc(&FieldListWithMeta{ Fields: searchFields, }) if err != nil { t.Fatalf("saveDoc: %v", err) } want := &pb.Document{ Field: protoFields, OrderId: got.OrderId, OrderIdSource: pb.Document_DEFAULTED.Enum(), } if !proto.Equal(got, want) { t.Errorf("\ngot %v\nwant %v", got, want) } } func TestLoadSaveWithStruct(t *testing.T) { type gopher struct { Name string Info string `search:"about"` Legs float64 `search:",facet"` Fuzz Atom `search:"Fur,facet"` } doc := gopher{"Gopher", "Likes slide rules.", 4, Atom("furry")} pb := &pb.Document{ Field: []*pb.Field{ newStringValueField("Name", "Gopher", pb.FieldValue_TEXT), newStringValueField("about", "Likes slide rules.", pb.FieldValue_TEXT), }, Facet: []*pb.Facet{ newFacet("Legs", "4e+00", pb.FacetValue_NUMBER), newFacet("Fur", "furry", pb.FacetValue_ATOM), }, } var gotDoc gopher if err := loadDoc(&gotDoc, pb, nil); err != nil { t.Fatalf("loadDoc: %v", err) } if !reflect.DeepEqual(gotDoc, doc) { t.Errorf("loading doc\ngot %v\nwant %v", gotDoc, doc) } gotPB, err := saveDoc(&doc) if err != nil { t.Fatalf("saveDoc: %v", err) } gotPB.OrderId = nil // Don't test: it's time dependent. gotPB.OrderIdSource = nil // Don't test because it's contingent on OrderId. if !proto.Equal(gotPB, pb) { t.Errorf("saving doc\ngot %v\nwant %v", gotPB, pb) } } func TestValidFieldNames(t *testing.T) { testCases := []struct { name string valid bool }{ {"Normal", true}, {"Also_OK_123", true}, {"Not so great", false}, {"lower_case", true}, {"Exclaim!", false}, {"Hello세상아 안녕", false}, {"", false}, {"Hεllo", false}, {strings.Repeat("A", 500), true}, {strings.Repeat("A", 501), false}, } for _, tc := range testCases { _, err := saveDoc(&FieldList{ Field{Name: tc.name, Value: "val"}, }) if err != nil && !strings.Contains(err.Error(), "invalid field name") { t.Errorf("unexpected err %q for field name %q", err, tc.name) } if (err == nil) != tc.valid { t.Errorf("field %q: expected valid %t, received err %v", tc.name, tc.valid, err) } } } func TestValidLangs(t *testing.T) { testCases := []struct { field Field valid bool }{ {Field{Name: "Foo", Value: "String", Language: ""}, true}, {Field{Name: "Foo", Value: "String", Language: "en"}, true}, {Field{Name: "Foo", Value: "String", Language: "aussie"}, false}, {Field{Name: "Foo", Value: "String", Language: "12"}, false}, {Field{Name: "Foo", Value: HTML("String"), Language: "en"}, true}, {Field{Name: "Foo", Value: Atom("String"), Language: "en"}, false}, {Field{Name: "Foo", Value: 42, Language: "en"}, false}, } for _, tt := range testCases { _, err := saveDoc(&FieldList{tt.field}) if err == nil != tt.valid { t.Errorf("Field %v, got error %v, wanted valid %t", tt.field, err, tt.valid) } } } func TestDuplicateFields(t *testing.T) { testCases := []struct { desc string fields FieldList errMsg string // Non-empty if we expect an error }{ { desc: "multi string", fields: FieldList{{Name: "FieldA", Value: "val1"}, {Name: "FieldA", Value: "val2"}, {Name: "FieldA", Value: "val3"}}, }, { desc: "multi atom", fields: FieldList{{Name: "FieldA", Value: Atom("val1")}, {Name: "FieldA", Value: Atom("val2")}, {Name: "FieldA", Value: Atom("val3")}}, }, { desc: "mixed", fields: FieldList{{Name: "FieldA", Value: testString}, {Name: "FieldA", Value: testTime}, {Name: "FieldA", Value: float}}, }, { desc: "multi time", fields: FieldList{{Name: "FieldA", Value: testTime}, {Name: "FieldA", Value: testTime}}, errMsg: `duplicate time field "FieldA"`, }, { desc: "multi num", fields: FieldList{{Name: "FieldA", Value: float}, {Name: "FieldA", Value: float}}, errMsg: `duplicate numeric field "FieldA"`, }, } for _, tc := range testCases { _, err := saveDoc(&tc.fields) if (err == nil) != (tc.errMsg == "") || (err != nil && !strings.Contains(err.Error(), tc.errMsg)) { t.Errorf("%s: got err %v, wanted %q", tc.desc, err, tc.errMsg) } } } func TestLoadErrFieldMismatch(t *testing.T) { testCases := []struct { desc string dst interface{} src []*pb.Field err error }{ { desc: "missing", dst: &struct{ One string }{}, src: []*pb.Field{newStringValueField("Two", "woop!", pb.FieldValue_TEXT)}, err: &ErrFieldMismatch{ FieldName: "Two", Reason: "no such struct field", }, }, { desc: "wrong type", dst: &struct{ Num float64 }{}, src: []*pb.Field{newStringValueField("Num", "woop!", pb.FieldValue_TEXT)}, err: &ErrFieldMismatch{ FieldName: "Num", Reason: "type mismatch: float64 for string data", }, }, { desc: "unsettable", dst: &struct{ lower string }{}, src: []*pb.Field{newStringValueField("lower", "woop!", pb.FieldValue_TEXT)}, err: &ErrFieldMismatch{ FieldName: "lower", Reason: "cannot set struct field", }, }, } for _, tc := range testCases { err := loadDoc(tc.dst, &pb.Document{Field: tc.src}, nil) if !reflect.DeepEqual(err, tc.err) { t.Errorf("%s, got err %v, wanted %v", tc.desc, err, tc.err) } } } func TestLimit(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "Search", func(req *pb.SearchRequest, res *pb.SearchResponse) error { limit := 20 // Default per page. if req.Params.Limit != nil { limit = int(*req.Params.Limit) } res.Status = &pb.RequestStatus{Code: pb.SearchServiceError_OK.Enum()} res.MatchedCount = proto.Int64(int64(limit)) for i := 0; i < limit; i++ { res.Result = append(res.Result, &pb.SearchResult{Document: &pb.Document{}}) res.Cursor = proto.String("moreresults") } return nil }) const maxDocs = 500 // Limit maximum number of docs. testCases := []struct { limit, want int }{ {limit: 0, want: maxDocs}, {limit: 42, want: 42}, {limit: 100, want: 100}, {limit: 1000, want: maxDocs}, } for _, tt := range testCases { it := index.Search(c, "gopher", &SearchOptions{Limit: tt.limit, IDsOnly: true}) count := 0 for ; count < maxDocs; count++ { _, err := it.Next(nil) if err == Done { break } if err != nil { t.Fatalf("err after %d: %v", count, err) } } if count != tt.want { t.Errorf("got %d results, expected %d", count, tt.want) } } } func TestPut(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error { expectedIn := &pb.IndexDocumentRequest{ Params: &pb.IndexDocumentParams{ Document: []*pb.Document{ {Field: protoFields, OrderId: proto.Int32(42), OrderIdSource: pb.Document_SUPPLIED.Enum()}, }, IndexSpec: &pb.IndexSpec{ Name: proto.String("Doc"), }, }, } if !proto.Equal(in, expectedIn) { return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn) } *out = pb.IndexDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, }, DocId: []string{ "doc_id", }, } return nil }) id, err := index.Put(c, "", &FieldListWithMeta{ Meta: searchMeta, Fields: searchFields, }) if err != nil { t.Fatal(err) } if want := "doc_id"; id != want { t.Errorf("Got doc ID %q, want %q", id, want) } } func TestPutAutoOrderID(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error { if len(in.Params.GetDocument()) < 1 { return fmt.Errorf("expected at least one Document, got %v", in) } got, want := in.Params.Document[0].GetOrderId(), int32(time.Since(orderIDEpoch).Seconds()) if d := got - want; -5 > d || d > 5 { return fmt.Errorf("got OrderId %d, want near %d", got, want) } *out = pb.IndexDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, }, DocId: []string{ "doc_id", }, } return nil }) if _, err := index.Put(c, "", &searchFields); err != nil { t.Fatal(err) } } func TestPutBadStatus(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(_ *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error { *out = pb.IndexDocumentResponse{ Status: []*pb.RequestStatus{ { Code: pb.SearchServiceError_INVALID_REQUEST.Enum(), ErrorDetail: proto.String("insufficient gophers"), }, }, } return nil }) wantErr := "search: INVALID_REQUEST: insufficient gophers" if _, err := index.Put(c, "", &searchFields); err == nil || err.Error() != wantErr { t.Fatalf("Put: got %v error, want %q", err, wantErr) } } func TestPutMultiNilIDSlice(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error { if len(in.Params.GetDocument()) < 1 { return fmt.Errorf("got %v, want at least 1 document", in) } got, want := in.Params.Document[0].GetOrderId(), int32(time.Since(orderIDEpoch).Seconds()) if d := got - want; -5 > d || d > 5 { return fmt.Errorf("got OrderId %d, want near %d", got, want) } *out = pb.IndexDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, }, DocId: []string{ "doc_id", }, } return nil }) if _, err := index.PutMulti(c, nil, []interface{}{&searchFields}); err != nil { t.Fatal(err) } } func TestPutMultiError(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error { *out = pb.IndexDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, {Code: pb.SearchServiceError_PERMISSION_DENIED.Enum(), ErrorDetail: proto.String("foo")}, }, DocId: []string{ "id1", "", }, } return nil }) switch _, err := index.PutMulti(c, nil, []interface{}{&searchFields, &searchFields}); { case err == nil: t.Fatalf("got nil, want error") case err.(appengine.MultiError)[0] != nil: t.Fatalf("got %v, want nil MultiError[0]", err.(appengine.MultiError)[0]) case err.(appengine.MultiError)[1] == nil: t.Fatalf("got nil, want not-nill MultiError[1]") } } func TestPutMultiWrongNumberOfIDs(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error { return nil }) if _, err := index.PutMulti(c, []string{"a"}, []interface{}{&searchFields, &searchFields}); err == nil { t.Fatal("got success, want error") } } func TestPutMultiTooManyDocs(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(in *pb.IndexDocumentRequest, out *pb.IndexDocumentResponse) error { return nil }) srcs := make([]interface{}, 201) for i, _ := range srcs { srcs[i] = &searchFields } if _, err := index.PutMulti(c, nil, srcs); err != ErrTooManyDocuments { t.Fatalf("got %v, want ErrTooManyDocuments", err) } } func TestSortOptions(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } noErr := errors.New("") // Sentinel err to return to prevent sending request. testCases := []struct { desc string sort *SortOptions wantSort []*pb.SortSpec wantScorer *pb.ScorerSpec wantErr string }{ { desc: "No SortOptions", }, { desc: "Basic", sort: &SortOptions{ Expressions: []SortExpression{ {Expr: "dog"}, {Expr: "cat", Reverse: true}, {Expr: "gopher", Default: "blue"}, {Expr: "fish", Default: 2.0}, }, Limit: 42, Scorer: MatchScorer, }, wantSort: []*pb.SortSpec{ {SortExpression: proto.String("dog")}, {SortExpression: proto.String("cat"), SortDescending: proto.Bool(false)}, {SortExpression: proto.String("gopher"), DefaultValueText: proto.String("blue")}, {SortExpression: proto.String("fish"), DefaultValueNumeric: proto.Float64(2)}, }, wantScorer: &pb.ScorerSpec{ Limit: proto.Int32(42), Scorer: pb.ScorerSpec_MATCH_SCORER.Enum(), }, }, { desc: "Bad expression default", sort: &SortOptions{ Expressions: []SortExpression{ {Expr: "dog", Default: true}, }, }, wantErr: `search: invalid Default type bool for expression "dog"`, }, { desc: "RescoringMatchScorer", sort: &SortOptions{Scorer: RescoringMatchScorer}, wantScorer: &pb.ScorerSpec{Scorer: pb.ScorerSpec_RESCORING_MATCH_SCORER.Enum()}, }, } for _, tt := range testCases { c := aetesting.FakeSingleContext(t, "search", "Search", func(req *pb.SearchRequest, _ *pb.SearchResponse) error { params := req.Params if !reflect.DeepEqual(params.SortSpec, tt.wantSort) { t.Errorf("%s: params.SortSpec=%v; want %v", tt.desc, params.SortSpec, tt.wantSort) } if !reflect.DeepEqual(params.ScorerSpec, tt.wantScorer) { t.Errorf("%s: params.ScorerSpec=%v; want %v", tt.desc, params.ScorerSpec, tt.wantScorer) } return noErr // Always return some error to prevent response parsing. }) it := index.Search(c, "gopher", &SearchOptions{Sort: tt.sort}) _, err := it.Next(nil) if err == nil { t.Fatalf("%s: err==nil; should not happen", tt.desc) } if err.Error() != tt.wantErr { t.Errorf("%s: got error %q, want %q", tt.desc, err, tt.wantErr) } } } func TestFieldSpec(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } errFoo := errors.New("foo") // sentinel error when there isn't one. testCases := []struct { desc string opts *SearchOptions want *pb.FieldSpec }{ { desc: "No options", want: &pb.FieldSpec{}, }, { desc: "Fields", opts: &SearchOptions{ Fields: []string{"one", "two"}, }, want: &pb.FieldSpec{ Name: []string{"one", "two"}, }, }, { desc: "Expressions", opts: &SearchOptions{ Expressions: []FieldExpression{ {Name: "one", Expr: "price * quantity"}, {Name: "two", Expr: "min(daily_use, 10) * rate"}, }, }, want: &pb.FieldSpec{ Expression: []*pb.FieldSpec_Expression{ {Name: proto.String("one"), Expression: proto.String("price * quantity")}, {Name: proto.String("two"), Expression: proto.String("min(daily_use, 10) * rate")}, }, }, }, } for _, tt := range testCases { c := aetesting.FakeSingleContext(t, "search", "Search", func(req *pb.SearchRequest, _ *pb.SearchResponse) error { params := req.Params if !reflect.DeepEqual(params.FieldSpec, tt.want) { t.Errorf("%s: params.FieldSpec=%v; want %v", tt.desc, params.FieldSpec, tt.want) } return errFoo // Always return some error to prevent response parsing. }) it := index.Search(c, "gopher", tt.opts) if _, err := it.Next(nil); err != errFoo { t.Fatalf("%s: got error %v; want %v", tt.desc, err, errFoo) } } } func TestBasicSearchOpts(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } noErr := errors.New("") // Sentinel err to return to prevent sending request. testCases := []struct { desc string facetOpts []FacetSearchOption cursor Cursor offset int countAccuracy int want *pb.SearchParams wantErr string }{ { desc: "No options", want: &pb.SearchParams{}, }, { desc: "Default auto discovery", facetOpts: []FacetSearchOption{ AutoFacetDiscovery(0, 0), }, want: &pb.SearchParams{ AutoDiscoverFacetCount: proto.Int32(10), }, }, { desc: "Auto discovery", facetOpts: []FacetSearchOption{ AutoFacetDiscovery(7, 12), }, want: &pb.SearchParams{ AutoDiscoverFacetCount: proto.Int32(7), FacetAutoDetectParam: &pb.FacetAutoDetectParam{ ValueLimit: proto.Int32(12), }, }, }, { desc: "Param Depth", facetOpts: []FacetSearchOption{ AutoFacetDiscovery(7, 12), }, want: &pb.SearchParams{ AutoDiscoverFacetCount: proto.Int32(7), FacetAutoDetectParam: &pb.FacetAutoDetectParam{ ValueLimit: proto.Int32(12), }, }, }, { desc: "Doc depth", facetOpts: []FacetSearchOption{ FacetDocumentDepth(123), }, want: &pb.SearchParams{ FacetDepth: proto.Int32(123), }, }, { desc: "Facet discovery", facetOpts: []FacetSearchOption{ FacetDiscovery("colour"), FacetDiscovery("size", Atom("M"), Atom("L")), FacetDiscovery("price", LessThan(7), Range{7, 14}, AtLeast(14)), }, want: &pb.SearchParams{ IncludeFacet: []*pb.FacetRequest{ {Name: proto.String("colour")}, {Name: proto.String("size"), Params: &pb.FacetRequestParam{ ValueConstraint: []string{"M", "L"}, }}, {Name: proto.String("price"), Params: &pb.FacetRequestParam{ Range: []*pb.FacetRange{ {End: proto.String("7e+00")}, {Start: proto.String("7e+00"), End: proto.String("1.4e+01")}, {Start: proto.String("1.4e+01")}, }, }}, }, }, }, { desc: "Facet discovery - bad value", facetOpts: []FacetSearchOption{ FacetDiscovery("colour", true), }, wantErr: "bad FacetSearchOption: unsupported value type bool", }, { desc: "Facet discovery - mix value types", facetOpts: []FacetSearchOption{ FacetDiscovery("colour", Atom("blue"), AtLeast(7)), }, wantErr: "bad FacetSearchOption: values must all be Atom, or must all be Range", }, { desc: "Facet discovery - invalid range", facetOpts: []FacetSearchOption{ FacetDiscovery("colour", Range{negInf, posInf}), }, wantErr: "bad FacetSearchOption: invalid range: either Start or End must be finite", }, { desc: "Cursor", cursor: Cursor("mycursor"), want: &pb.SearchParams{ Cursor: proto.String("mycursor"), }, }, { desc: "Offset", offset: 121, want: &pb.SearchParams{ Offset: proto.Int32(121), }, }, { desc: "Cursor and Offset set", cursor: Cursor("mycursor"), offset: 121, wantErr: "at most one of Cursor and Offset may be specified", }, { desc: "Count accuracy", countAccuracy: 100, want: &pb.SearchParams{ MatchedCountAccuracy: proto.Int32(100), }, }, } for _, tt := range testCases { c := aetesting.FakeSingleContext(t, "search", "Search", func(req *pb.SearchRequest, _ *pb.SearchResponse) error { if tt.want == nil { t.Errorf("%s: expected call to fail", tt.desc) return nil } // Set default fields. tt.want.Query = proto.String("gopher") tt.want.IndexSpec = &pb.IndexSpec{Name: proto.String("Doc")} tt.want.CursorType = pb.SearchParams_PER_RESULT.Enum() tt.want.FieldSpec = &pb.FieldSpec{} if got := req.Params; !reflect.DeepEqual(got, tt.want) { t.Errorf("%s: params=%v; want %v", tt.desc, got, tt.want) } return noErr // Always return some error to prevent response parsing. }) it := index.Search(c, "gopher", &SearchOptions{ Facets: tt.facetOpts, Cursor: tt.cursor, Offset: tt.offset, CountAccuracy: tt.countAccuracy, }) _, err := it.Next(nil) if err == nil { t.Fatalf("%s: err==nil; should not happen", tt.desc) } if err.Error() != tt.wantErr { t.Errorf("%s: got error %q, want %q", tt.desc, err, tt.wantErr) } } } func TestFacetRefinements(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } noErr := errors.New("") // Sentinel err to return to prevent sending request. testCases := []struct { desc string refine []Facet want []*pb.FacetRefinement wantErr string }{ { desc: "No refinements", }, { desc: "Basic", refine: []Facet{ {Name: "fur", Value: Atom("fluffy")}, {Name: "age", Value: LessThan(123)}, {Name: "age", Value: AtLeast(0)}, {Name: "legs", Value: Range{Start: 3, End: 5}}, }, want: []*pb.FacetRefinement{ {Name: proto.String("fur"), Value: proto.String("fluffy")}, {Name: proto.String("age"), Range: &pb.FacetRefinement_Range{End: proto.String("1.23e+02")}}, {Name: proto.String("age"), Range: &pb.FacetRefinement_Range{Start: proto.String("0e+00")}}, {Name: proto.String("legs"), Range: &pb.FacetRefinement_Range{Start: proto.String("3e+00"), End: proto.String("5e+00")}}, }, }, { desc: "Infinite range", refine: []Facet{ {Name: "age", Value: Range{Start: negInf, End: posInf}}, }, wantErr: `search: refinement for facet "age": either Start or End must be finite`, }, { desc: "Bad End value in range", refine: []Facet{ {Name: "age", Value: LessThan(2147483648)}, }, wantErr: `search: refinement for facet "age": invalid value for End`, }, { desc: "Bad Start value in range", refine: []Facet{ {Name: "age", Value: AtLeast(-2147483649)}, }, wantErr: `search: refinement for facet "age": invalid value for Start`, }, { desc: "Unknown value type", refine: []Facet{ {Name: "age", Value: "you can't use strings!"}, }, wantErr: `search: unsupported refinement for facet "age" of type string`, }, } for _, tt := range testCases { c := aetesting.FakeSingleContext(t, "search", "Search", func(req *pb.SearchRequest, _ *pb.SearchResponse) error { if got := req.Params.FacetRefinement; !reflect.DeepEqual(got, tt.want) { t.Errorf("%s: params.FacetRefinement=%v; want %v", tt.desc, got, tt.want) } return noErr // Always return some error to prevent response parsing. }) it := index.Search(c, "gopher", &SearchOptions{Refinements: tt.refine}) _, err := it.Next(nil) if err == nil { t.Fatalf("%s: err==nil; should not happen", tt.desc) } if err.Error() != tt.wantErr { t.Errorf("%s: got error %q, want %q", tt.desc, err, tt.wantErr) } } } func TestNamespaceResetting(t *testing.T) { namec := make(chan *string, 1) c0 := aetesting.FakeSingleContext(t, "search", "IndexDocument", func(req *pb.IndexDocumentRequest, res *pb.IndexDocumentResponse) error { namec <- req.Params.IndexSpec.Namespace return fmt.Errorf("RPC error") }) // Check that wrapping c0 in a namespace twice works correctly. c1, err := appengine.Namespace(c0, "A") if err != nil { t.Fatalf("appengine.Namespace: %v", err) } c2, err := appengine.Namespace(c1, "") // should act as the original context if err != nil { t.Fatalf("appengine.Namespace: %v", err) } i := (&Index{}) i.Put(c0, "something", &searchDoc) if ns := <-namec; ns != nil { t.Errorf(`Put with c0: ns = %q, want nil`, *ns) } i.Put(c1, "something", &searchDoc) if ns := <-namec; ns == nil { t.Error(`Put with c1: ns = nil, want "A"`) } else if *ns != "A" { t.Errorf(`Put with c1: ns = %q, want "A"`, *ns) } i.Put(c2, "something", &searchDoc) if ns := <-namec; ns != nil { t.Errorf(`Put with c2: ns = %q, want nil`, *ns) } } func TestDelete(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error { expectedIn := &pb.DeleteDocumentRequest{ Params: &pb.DeleteDocumentParams{ DocId: []string{"id"}, IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")}, }, } if !proto.Equal(in, expectedIn) { return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn) } *out = pb.DeleteDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, }, } return nil }) if err := index.Delete(c, "id"); err != nil { t.Fatal(err) } } func TestDeleteMulti(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error { expectedIn := &pb.DeleteDocumentRequest{ Params: &pb.DeleteDocumentParams{ DocId: []string{"id1", "id2"}, IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")}, }, } if !proto.Equal(in, expectedIn) { return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn) } *out = pb.DeleteDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, {Code: pb.SearchServiceError_OK.Enum()}, }, } return nil }) if err := index.DeleteMulti(c, []string{"id1", "id2"}); err != nil { t.Fatal(err) } } func TestDeleteWrongNumberOfResults(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error { expectedIn := &pb.DeleteDocumentRequest{ Params: &pb.DeleteDocumentParams{ DocId: []string{"id1", "id2"}, IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")}, }, } if !proto.Equal(in, expectedIn) { return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn) } *out = pb.DeleteDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, }, } return nil }) if err := index.DeleteMulti(c, []string{"id1", "id2"}); err == nil { t.Fatalf("got nil, want error") } } func TestDeleteMultiError(t *testing.T) { index, err := Open("Doc") if err != nil { t.Fatalf("err from Open: %v", err) } c := aetesting.FakeSingleContext(t, "search", "DeleteDocument", func(in *pb.DeleteDocumentRequest, out *pb.DeleteDocumentResponse) error { expectedIn := &pb.DeleteDocumentRequest{ Params: &pb.DeleteDocumentParams{ DocId: []string{"id1", "id2"}, IndexSpec: &pb.IndexSpec{Name: proto.String("Doc")}, }, } if !proto.Equal(in, expectedIn) { return fmt.Errorf("unsupported argument:\ngot %v\nwant %v", in, expectedIn) } *out = pb.DeleteDocumentResponse{ Status: []*pb.RequestStatus{ {Code: pb.SearchServiceError_OK.Enum()}, {Code: pb.SearchServiceError_PERMISSION_DENIED.Enum(), ErrorDetail: proto.String("foo")}, }, } return nil }) switch err := index.DeleteMulti(c, []string{"id1", "id2"}); { case err == nil: t.Fatalf("got nil, want error") case err.(appengine.MultiError)[0] != nil: t.Fatalf("got %v, want nil MultiError[0]", err.(appengine.MultiError)[0]) case err.(appengine.MultiError)[1] == nil: t.Fatalf("got nil, want not-nill MultiError[1]") } }
search
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/search/struct.go
// Copyright 2023 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 search import ( "fmt" "reflect" "strings" "sync" ) // ErrFieldMismatch is returned when a field is to be loaded into a different // than the one it was stored from, or when a field is missing or unexported in // the destination struct. type ErrFieldMismatch struct { FieldName string Reason string } func (e *ErrFieldMismatch) Error() string { return fmt.Sprintf("search: cannot load field %q: %s", e.FieldName, e.Reason) } // ErrFacetMismatch is returned when a facet is to be loaded into a different // type than the one it was stored from, or when a field is missing or // unexported in the destination struct. StructType is the type of the struct // pointed to by the destination argument passed to Iterator.Next. type ErrFacetMismatch struct { StructType reflect.Type FacetName string Reason string } func (e *ErrFacetMismatch) Error() string { return fmt.Sprintf("search: cannot load facet %q into a %q: %s", e.FacetName, e.StructType, e.Reason) } // structCodec defines how to convert a given struct to/from a search document. type structCodec struct { // byIndex returns the struct tag for the i'th struct field. byIndex []structTag // fieldByName returns the index of the struct field for the given field name. fieldByName map[string]int // facetByName returns the index of the struct field for the given facet name, facetByName map[string]int } // structTag holds a structured version of each struct field's parsed tag. type structTag struct { name string facet bool ignore bool } var ( codecsMu sync.RWMutex codecs = map[reflect.Type]*structCodec{} ) func loadCodec(t reflect.Type) (*structCodec, error) { codecsMu.RLock() codec, ok := codecs[t] codecsMu.RUnlock() if ok { return codec, nil } codecsMu.Lock() defer codecsMu.Unlock() if codec, ok := codecs[t]; ok { return codec, nil } codec = &structCodec{ fieldByName: make(map[string]int), facetByName: make(map[string]int), } for i, I := 0, t.NumField(); i < I; i++ { f := t.Field(i) name, opts := f.Tag.Get("search"), "" if i := strings.Index(name, ","); i != -1 { name, opts = name[:i], name[i+1:] } ignore := false if name == "-" { ignore = true } else if name == "" { name = f.Name } else if !validFieldName(name) { return nil, fmt.Errorf("search: struct tag has invalid field name: %q", name) } facet := opts == "facet" codec.byIndex = append(codec.byIndex, structTag{name: name, facet: facet, ignore: ignore}) if facet { codec.facetByName[name] = i } else { codec.fieldByName[name] = i } } codecs[t] = codec return codec, nil } // structFLS adapts a struct to be a FieldLoadSaver. type structFLS struct { v reflect.Value codec *structCodec } func (s structFLS) Load(fields []Field, meta *DocumentMetadata) error { var err error for _, field := range fields { i, ok := s.codec.fieldByName[field.Name] if !ok { // Note the error, but keep going. err = &ErrFieldMismatch{ FieldName: field.Name, Reason: "no such struct field", } continue } f := s.v.Field(i) if !f.CanSet() { // Note the error, but keep going. err = &ErrFieldMismatch{ FieldName: field.Name, Reason: "cannot set struct field", } continue } v := reflect.ValueOf(field.Value) if ft, vt := f.Type(), v.Type(); ft != vt { err = &ErrFieldMismatch{ FieldName: field.Name, Reason: fmt.Sprintf("type mismatch: %v for %v data", ft, vt), } continue } f.Set(v) } if meta == nil { return err } for _, facet := range meta.Facets { i, ok := s.codec.facetByName[facet.Name] if !ok { // Note the error, but keep going. if err == nil { err = &ErrFacetMismatch{ StructType: s.v.Type(), FacetName: facet.Name, Reason: "no matching field found", } } continue } f := s.v.Field(i) if !f.CanSet() { // Note the error, but keep going. if err == nil { err = &ErrFacetMismatch{ StructType: s.v.Type(), FacetName: facet.Name, Reason: "unable to set unexported field of struct", } } continue } v := reflect.ValueOf(facet.Value) if ft, vt := f.Type(), v.Type(); ft != vt { if err == nil { err = &ErrFacetMismatch{ StructType: s.v.Type(), FacetName: facet.Name, Reason: fmt.Sprintf("type mismatch: %v for %d data", ft, vt), } continue } } f.Set(v) } return err } func (s structFLS) Save() ([]Field, *DocumentMetadata, error) { fields := make([]Field, 0, len(s.codec.fieldByName)) var facets []Facet for i, tag := range s.codec.byIndex { if tag.ignore { continue } f := s.v.Field(i) if !f.CanSet() { continue } if tag.facet { facets = append(facets, Facet{Name: tag.name, Value: f.Interface()}) } else { fields = append(fields, Field{Name: tag.name, Value: f.Interface()}) } } return fields, &DocumentMetadata{Facets: facets}, nil } // newStructFLS returns a FieldLoadSaver for the struct pointer p. func newStructFLS(p interface{}) (FieldLoadSaver, error) { v := reflect.ValueOf(p) if v.Kind() != reflect.Ptr || v.IsNil() || v.Elem().Kind() != reflect.Struct { return nil, ErrInvalidDocumentType } codec, err := loadCodec(v.Elem().Type()) if err != nil { return nil, err } return structFLS{v.Elem(), codec}, nil } func loadStructWithMeta(dst interface{}, f []Field, meta *DocumentMetadata) error { x, err := newStructFLS(dst) if err != nil { return err } return x.Load(f, meta) } func saveStructWithMeta(src interface{}) ([]Field, *DocumentMetadata, error) { x, err := newStructFLS(src) if err != nil { return nil, nil, err } return x.Save() } // LoadStruct loads the fields from f to dst. dst must be a struct pointer. func LoadStruct(dst interface{}, f []Field) error { return loadStructWithMeta(dst, f, nil) } // SaveStruct returns the fields from src as a slice of Field. // src must be a struct pointer. func SaveStruct(src interface{}) ([]Field, error) { f, _, err := saveStructWithMeta(src) return f, err }
capability
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/capability/capability.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 capability exposes information about outages and scheduled downtime for specific API capabilities. This package does not work in App Engine "flexible environment". Example: if !capability.Enabled(c, "datastore_v3", "write") { // show user a different page } */ package capability // import "google.golang.org/appengine/v2/capability" import ( "context" "google.golang.org/appengine/v2/internal" "google.golang.org/appengine/v2/log" pb "google.golang.org/appengine/v2/internal/capability" ) // Enabled returns whether an API's capabilities are enabled. // The wildcard "*" capability matches every capability of an API. // If the underlying RPC fails (if the package is unknown, for example), // false is returned and information is written to the application log. func Enabled(ctx context.Context, api, capability string) bool { // For non datastore*/write requests always return ENABLED if !(api == "datastore_v3" && capability == "write") { return true } req := &pb.IsEnabledRequest{ Package: &api, Capability: []string{capability}, } res := &pb.IsEnabledResponse{} if err := internal.Call(ctx, "capability_service", "IsEnabled", req, res); err != nil { log.Warningf(ctx, "capability.Enabled: RPC failed: %v", err) return false } return *res.SummaryStatus == pb.IsEnabledResponse_ENABLED }
user
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/user/user.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 user provides a client for App Engine's user authentication service. package user // import "google.golang.org/appengine/v2/user" import ( "context" "strings" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/user" ) // User represents a user of the application. type User struct { Email string AuthDomain string Admin bool // ID is the unique permanent ID of the user. // It is populated if the Email is associated // with a Google account, or empty otherwise. ID string // ClientID is the ID of the pre-registered client so its identity can be verified. // See https://developers.google.com/console/help/#generatingoauth2 for more information. ClientID string FederatedIdentity string FederatedProvider string } // String returns a displayable name for the user. func (u *User) String() string { if u.AuthDomain != "" && strings.HasSuffix(u.Email, "@"+u.AuthDomain) { return u.Email[:len(u.Email)-len("@"+u.AuthDomain)] } if u.FederatedIdentity != "" { return u.FederatedIdentity } return u.Email } // LoginURL returns a URL that, when visited, prompts the user to sign in, // then redirects the user to the URL specified by dest. func LoginURL(c context.Context, dest string) (string, error) { return LoginURLFederated(c, dest, "") } // LoginURLFederated is like LoginURL but accepts a user's OpenID identifier. func LoginURLFederated(c context.Context, dest, identity string) (string, error) { req := &pb.CreateLoginURLRequest{ DestinationUrl: proto.String(dest), } if identity != "" { req.FederatedIdentity = proto.String(identity) } res := &pb.CreateLoginURLResponse{} if err := internal.Call(c, "user", "CreateLoginURL", req, res); err != nil { return "", err } return *res.LoginUrl, nil } // LogoutURL returns a URL that, when visited, signs the user out, // then redirects the user to the URL specified by dest. func LogoutURL(c context.Context, dest string) (string, error) { req := &pb.CreateLogoutURLRequest{ DestinationUrl: proto.String(dest), } res := &pb.CreateLogoutURLResponse{} if err := internal.Call(c, "user", "CreateLogoutURL", req, res); err != nil { return "", err } return *res.LogoutUrl, nil } func init() { internal.RegisterErrorCodeMap("user", pb.UserServiceError_ErrorCode_name) } // Current returns the currently logged-in user, // or nil if the user is not signed in. func Current(c context.Context) *User { h := internal.IncomingHeaders(c) u := &User{ Email: h.Get("X-AppEngine-User-Email"), AuthDomain: h.Get("X-AppEngine-Auth-Domain"), ID: h.Get("X-AppEngine-User-Id"), Admin: h.Get("X-AppEngine-User-Is-Admin") == "1", FederatedIdentity: h.Get("X-AppEngine-Federated-Identity"), FederatedProvider: h.Get("X-AppEngine-Federated-Provider"), } if u.Email == "" && u.FederatedIdentity == "" { return nil } return u } // IsAdmin returns true if the current user is signed in and // is currently registered as an administrator of the application. func IsAdmin(c context.Context) bool { h := internal.IncomingHeaders(c) return h.Get("X-AppEngine-User-Is-Admin") == "1" }
user
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/user/user_test.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 user import ( "fmt" "net/http" "testing" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" "google.golang.org/appengine/v2/internal/aetesting" pb "google.golang.org/appengine/v2/internal/user" ) func baseReq() *http.Request { return &http.Request{ Header: http.Header{}, } } type basicUserTest struct { nickname, email, authDomain, admin string // expectations isNil, isAdmin bool displayName string } var basicUserTests = []basicUserTest{ {"", "", "", "0", true, false, ""}, {"ken", "ken@example.com", "example.com", "0", false, false, "ken"}, {"ken", "ken@example.com", "auth_domain.com", "1", false, true, "ken@example.com"}, } func TestBasicUserAPI(t *testing.T) { for i, tc := range basicUserTests { req := baseReq() req.Header.Set("X-AppEngine-User-Nickname", tc.nickname) req.Header.Set("X-AppEngine-User-Email", tc.email) req.Header.Set("X-AppEngine-Auth-Domain", tc.authDomain) req.Header.Set("X-AppEngine-User-Is-Admin", tc.admin) c := internal.ContextForTesting(req) if ga := IsAdmin(c); ga != tc.isAdmin { t.Errorf("test %d: expected IsAdmin(c) = %v, got %v", i, tc.isAdmin, ga) } u := Current(c) if tc.isNil { if u != nil { t.Errorf("test %d: expected u == nil, got %+v", i, u) } continue } if u == nil { t.Errorf("test %d: expected u != nil, got nil", i) continue } if u.Email != tc.email { t.Errorf("test %d: expected u.Email = %q, got %q", i, tc.email, u.Email) } if gs := u.String(); gs != tc.displayName { t.Errorf("test %d: expected u.String() = %q, got %q", i, tc.displayName, gs) } if u.Admin != tc.isAdmin { t.Errorf("test %d: expected u.Admin = %v, got %v", i, tc.isAdmin, u.Admin) } } } func TestLoginURL(t *testing.T) { expectedQuery := &pb.CreateLoginURLRequest{ DestinationUrl: proto.String("/destination"), } const expectedDest = "/redir/dest" c := aetesting.FakeSingleContext(t, "user", "CreateLoginURL", func(req *pb.CreateLoginURLRequest, res *pb.CreateLoginURLResponse) error { if !proto.Equal(req, expectedQuery) { return fmt.Errorf("got %v, want %v", req, expectedQuery) } res.LoginUrl = proto.String(expectedDest) return nil }) url, err := LoginURL(c, "/destination") if err != nil { t.Fatalf("LoginURL failed: %v", err) } if url != expectedDest { t.Errorf("got %v, want %v", url, expectedDest) } } // TODO(dsymonds): Add test for LogoutURL.
user
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/user/oauth.go
// Copyright 2012 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 user import ( "context" "google.golang.org/appengine/v2/internal" pb "google.golang.org/appengine/v2/internal/user" ) // CurrentOAuth returns the user associated with the OAuth consumer making this // request. If the OAuth consumer did not make a valid OAuth request, or the // scopes is non-empty and the current user does not have at least one of the // scopes, this method will return an error. func CurrentOAuth(c context.Context, scopes ...string) (*User, error) { req := &pb.GetOAuthUserRequest{} if len(scopes) != 1 || scopes[0] != "" { // The signature for this function used to be CurrentOAuth(Context, string). // Ignore the singular "" scope to preserve existing behavior. req.Scopes = scopes } res := &pb.GetOAuthUserResponse{} err := internal.Call(c, "user", "GetOAuthUser", req, res) if err != nil { return nil, err } return &User{ Email: *res.Email, AuthDomain: *res.AuthDomain, Admin: res.GetIsAdmin(), ID: *res.UserId, ClientID: res.GetClientId(), }, nil } // OAuthConsumerKey returns the OAuth consumer key provided with the current // request. This method will return an error if the OAuth request was invalid. func OAuthConsumerKey(c context.Context) (string, error) { req := &pb.CheckOAuthSignatureRequest{} res := &pb.CheckOAuthSignatureResponse{} err := internal.Call(c, "user", "CheckOAuthSignature", req, res) if err != nil { return "", err } return *res.OauthConsumerKey, err }
taskqueue
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/taskqueue/taskqueue_test.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 taskqueue import ( "errors" "fmt" "net/http" "reflect" "testing" "time" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" "google.golang.org/appengine/v2/internal/aetesting" pb "google.golang.org/appengine/v2/internal/taskqueue" ) func TestAddErrors(t *testing.T) { var tests = []struct { err, want error sameErr bool // if true, should return err exactly }{ { err: &internal.APIError{ Service: "taskqueue", Code: int32(pb.TaskQueueServiceError_TASK_ALREADY_EXISTS), }, want: ErrTaskAlreadyAdded, }, { err: &internal.APIError{ Service: "taskqueue", Code: int32(pb.TaskQueueServiceError_TOMBSTONED_TASK), }, want: ErrTaskAlreadyAdded, }, { err: &internal.APIError{ Service: "taskqueue", Code: int32(pb.TaskQueueServiceError_UNKNOWN_QUEUE), }, want: errors.New("not used"), sameErr: true, }, } for _, tc := range tests { c := aetesting.FakeSingleContext(t, "taskqueue", "Add", func(req *pb.TaskQueueAddRequest, res *pb.TaskQueueAddResponse) error { // don't fill in any of the response return tc.err }) task := &Task{Path: "/worker", Method: "PULL"} _, err := Add(c, task, "a-queue") want := tc.want if tc.sameErr { want = tc.err } if err != want { t.Errorf("Add with tc.err = %v, got %#v, want = %#v", tc.err, err, want) } } } func TestAddMulti(t *testing.T) { c := aetesting.FakeSingleContext(t, "taskqueue", "BulkAdd", func(req *pb.TaskQueueBulkAddRequest, res *pb.TaskQueueBulkAddResponse) error { res.Taskresult = []*pb.TaskQueueBulkAddResponse_TaskResult{ { Result: pb.TaskQueueServiceError_OK.Enum(), }, { Result: pb.TaskQueueServiceError_TASK_ALREADY_EXISTS.Enum(), }, { Result: pb.TaskQueueServiceError_TOMBSTONED_TASK.Enum(), }, { Result: pb.TaskQueueServiceError_INTERNAL_ERROR.Enum(), }, } return nil }) tasks := []*Task{ {Path: "/worker", Method: "PULL"}, {Path: "/worker", Method: "PULL"}, {Path: "/worker", Method: "PULL"}, {Path: "/worker", Method: "PULL"}, } r, err := AddMulti(c, tasks, "a-queue") if len(r) != len(tasks) { t.Fatalf("AddMulti returned %d tasks, want %d", len(r), len(tasks)) } want := appengine.MultiError{ nil, ErrTaskAlreadyAdded, ErrTaskAlreadyAdded, &internal.APIError{ Service: "taskqueue", Code: int32(pb.TaskQueueServiceError_INTERNAL_ERROR), }, } if !reflect.DeepEqual(err, want) { t.Errorf("AddMulti got %v, wanted %v", err, want) } } func TestAddWithEmptyPath(t *testing.T) { c := aetesting.FakeSingleContext(t, "taskqueue", "Add", func(req *pb.TaskQueueAddRequest, res *pb.TaskQueueAddResponse) error { if got, want := string(req.Url), "/_ah/queue/a-queue"; got != want { return fmt.Errorf("req.Url = %q; want %q", got, want) } return nil }) if _, err := Add(c, &Task{}, "a-queue"); err != nil { t.Fatalf("Add: %v", err) } } func TestParseRequestHeaders(t *testing.T) { tests := []struct { Header http.Header Want RequestHeaders }{ { Header: map[string][]string{ "X-Appengine-Queuename": []string{"foo"}, "X-Appengine-Taskname": []string{"bar"}, "X-Appengine-Taskretrycount": []string{"4294967297"}, // 2^32 + 1 "X-Appengine-Taskexecutioncount": []string{"4294967298"}, // 2^32 + 2 "X-Appengine-Tasketa": []string{"1500000000"}, "X-Appengine-Taskpreviousresponse": []string{"404"}, "X-Appengine-Taskretryreason": []string{"baz"}, "X-Appengine-Failfast": []string{"yes"}, }, Want: RequestHeaders{ QueueName: "foo", TaskName: "bar", TaskRetryCount: 4294967297, TaskExecutionCount: 4294967298, TaskETA: time.Date(2017, time.July, 14, 2, 40, 0, 0, time.UTC), TaskPreviousResponse: 404, TaskRetryReason: "baz", FailFast: true, }, }, { Header: map[string][]string{}, Want: RequestHeaders{ QueueName: "", TaskName: "", TaskRetryCount: 0, TaskExecutionCount: 0, TaskETA: time.Time{}, TaskPreviousResponse: 0, TaskRetryReason: "", FailFast: false, }, }, } for idx, test := range tests { got := *ParseRequestHeaders(test.Header) if got.TaskETA.UnixNano() != test.Want.TaskETA.UnixNano() { t.Errorf("%d. ParseRequestHeaders got TaskETA %v, wanted %v", idx, got.TaskETA, test.Want.TaskETA) } got.TaskETA = time.Time{} test.Want.TaskETA = time.Time{} if !reflect.DeepEqual(got, test.Want) { t.Errorf("%d. ParseRequestHeaders got %v, wanted %v", idx, got, test.Want) } } }
taskqueue
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/taskqueue/taskqueue.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 taskqueue provides a client for App Engine's taskqueue service. Using this service, applications may perform work outside a user's request. A Task may be constructed manually; alternatively, since the most common taskqueue operation is to add a single POST task, NewPOSTTask makes it easy. t := taskqueue.NewPOSTTask("/worker", url.Values{ "key": {key}, }) taskqueue.Add(c, t, "") // add t to the default queue */ package taskqueue // import "google.golang.org/appengine/v2/taskqueue" import ( "context" "errors" "fmt" "net/http" "net/url" "strconv" "time" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" dspb "google.golang.org/appengine/v2/internal/datastore" pb "google.golang.org/appengine/v2/internal/taskqueue" ) var ( // ErrTaskAlreadyAdded is the error returned by Add and AddMulti when a task has already been added with a particular name. ErrTaskAlreadyAdded = errors.New("taskqueue: task has already been added") ) // RetryOptions let you control whether to retry a task and the backoff intervals between tries. type RetryOptions struct { // Number of tries/leases after which the task fails permanently and is deleted. // If AgeLimit is also set, both limits must be exceeded for the task to fail permanently. RetryLimit int32 // Maximum time allowed since the task's first try before the task fails permanently and is deleted (only for push tasks). // If RetryLimit is also set, both limits must be exceeded for the task to fail permanently. AgeLimit time.Duration // Minimum time between successive tries (only for push tasks). MinBackoff time.Duration // Maximum time between successive tries (only for push tasks). MaxBackoff time.Duration // Maximum number of times to double the interval between successive tries before the intervals increase linearly (only for push tasks). MaxDoublings int32 // If MaxDoublings is zero, set ApplyZeroMaxDoublings to true to override the default non-zero value. // Otherwise a zero MaxDoublings is ignored and the default is used. ApplyZeroMaxDoublings bool } // toRetryParameters converts RetryOptions to pb.TaskQueueRetryParameters. func (opt *RetryOptions) toRetryParameters() *pb.TaskQueueRetryParameters { params := &pb.TaskQueueRetryParameters{} if opt.RetryLimit > 0 { params.RetryLimit = proto.Int32(opt.RetryLimit) } if opt.AgeLimit > 0 { params.AgeLimitSec = proto.Int64(int64(opt.AgeLimit.Seconds())) } if opt.MinBackoff > 0 { params.MinBackoffSec = proto.Float64(opt.MinBackoff.Seconds()) } if opt.MaxBackoff > 0 { params.MaxBackoffSec = proto.Float64(opt.MaxBackoff.Seconds()) } if opt.MaxDoublings > 0 || (opt.MaxDoublings == 0 && opt.ApplyZeroMaxDoublings) { params.MaxDoublings = proto.Int32(opt.MaxDoublings) } return params } // A Task represents a task to be executed. type Task struct { // Path is the worker URL for the task. // If unset, it will default to /_ah/queue/<queue_name>. Path string // Payload is the data for the task. // This will be delivered as the HTTP request body. // It is only used when Method is POST, PUT or PULL. // url.Values' Encode method may be used to generate this for POST requests. Payload []byte // Additional HTTP headers to pass at the task's execution time. // To schedule the task to be run with an alternate app version // or backend, set the "Host" header. Header http.Header // Method is the HTTP method for the task ("GET", "POST", etc.), // or "PULL" if this is task is destined for a pull-based queue. // If empty, this defaults to "POST". Method string // A name for the task. // If empty, a name will be chosen. Name string // Delay specifies the duration the task queue service must wait // before executing the task. // Either Delay or ETA may be set, but not both. Delay time.Duration // ETA specifies the earliest time a task may be executed (push queues) // or leased (pull queues). // Either Delay or ETA may be set, but not both. ETA time.Time // The number of times the task has been dispatched or leased. RetryCount int32 // Tag for the task. Only used when Method is PULL. Tag string // Retry options for this task. May be nil. RetryOptions *RetryOptions } func (t *Task) method() string { if t.Method == "" { return "POST" } return t.Method } // NewPOSTTask creates a Task that will POST to a path with the given form data. func NewPOSTTask(path string, params url.Values) *Task { h := make(http.Header) h.Set("Content-Type", "application/x-www-form-urlencoded") return &Task{ Path: path, Payload: []byte(params.Encode()), Header: h, Method: "POST", } } // RequestHeaders are the special HTTP request headers available to push task // HTTP request handlers. These headers are set internally by App Engine. // See https://cloud.google.com/appengine/docs/standard/go/taskqueue/push/creating-handlers#reading_request_headers // for a description of the fields. type RequestHeaders struct { QueueName string TaskName string TaskRetryCount int64 TaskExecutionCount int64 TaskETA time.Time TaskPreviousResponse int TaskRetryReason string FailFast bool } // ParseRequestHeaders parses the special HTTP request headers available to push // task request handlers. This function silently ignores values of the wrong // format. func ParseRequestHeaders(h http.Header) *RequestHeaders { ret := &RequestHeaders{ QueueName: h.Get("X-AppEngine-QueueName"), TaskName: h.Get("X-AppEngine-TaskName"), } ret.TaskRetryCount, _ = strconv.ParseInt(h.Get("X-AppEngine-TaskRetryCount"), 10, 64) ret.TaskExecutionCount, _ = strconv.ParseInt(h.Get("X-AppEngine-TaskExecutionCount"), 10, 64) etaSecs, _ := strconv.ParseInt(h.Get("X-AppEngine-TaskETA"), 10, 64) if etaSecs != 0 { ret.TaskETA = time.Unix(etaSecs, 0) } ret.TaskPreviousResponse, _ = strconv.Atoi(h.Get("X-AppEngine-TaskPreviousResponse")) ret.TaskRetryReason = h.Get("X-AppEngine-TaskRetryReason") if h.Get("X-AppEngine-FailFast") != "" { ret.FailFast = true } return ret } var ( currentNamespace = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace") defaultNamespace = http.CanonicalHeaderKey("X-AppEngine-Default-Namespace") ) func getDefaultNamespace(ctx context.Context) string { return internal.IncomingHeaders(ctx).Get(defaultNamespace) } func newAddReq(c context.Context, task *Task, queueName string) (*pb.TaskQueueAddRequest, error) { if queueName == "" { queueName = "default" } path := task.Path if path == "" { path = "/_ah/queue/" + queueName } eta := task.ETA if eta.IsZero() { eta = time.Now().Add(task.Delay) } else if task.Delay != 0 { panic("taskqueue: both Delay and ETA are set") } req := &pb.TaskQueueAddRequest{ QueueName: []byte(queueName), TaskName: []byte(task.Name), EtaUsec: proto.Int64(eta.UnixNano() / 1e3), } method := task.method() if method == "PULL" { // Pull-based task req.Body = task.Payload req.Mode = pb.TaskQueueMode_PULL.Enum() if task.Tag != "" { req.Tag = []byte(task.Tag) } } else { // HTTP-based task if v, ok := pb.TaskQueueAddRequest_RequestMethod_value[method]; ok { req.Method = pb.TaskQueueAddRequest_RequestMethod(v).Enum() } else { return nil, fmt.Errorf("taskqueue: bad method %q", method) } req.Url = []byte(path) for k, vs := range task.Header { for _, v := range vs { req.Header = append(req.Header, &pb.TaskQueueAddRequest_Header{ Key: []byte(k), Value: []byte(v), }) } } if method == "POST" || method == "PUT" { req.Body = task.Payload } // Namespace headers. if _, ok := task.Header[currentNamespace]; !ok { // Fetch the current namespace of this request. ns := internal.NamespaceFromContext(c) req.Header = append(req.Header, &pb.TaskQueueAddRequest_Header{ Key: []byte(currentNamespace), Value: []byte(ns), }) } if _, ok := task.Header[defaultNamespace]; !ok { // Fetch the X-AppEngine-Default-Namespace header of this request. if ns := getDefaultNamespace(c); ns != "" { req.Header = append(req.Header, &pb.TaskQueueAddRequest_Header{ Key: []byte(defaultNamespace), Value: []byte(ns), }) } } } if task.RetryOptions != nil { req.RetryParameters = task.RetryOptions.toRetryParameters() } return req, nil } var alreadyAddedErrors = map[pb.TaskQueueServiceError_ErrorCode]bool{ pb.TaskQueueServiceError_TASK_ALREADY_EXISTS: true, pb.TaskQueueServiceError_TOMBSTONED_TASK: true, } // Add adds the task to a named queue. // An empty queue name means that the default queue will be used. // Add returns an equivalent Task with defaults filled in, including setting // the task's Name field to the chosen name if the original was empty. func Add(c context.Context, task *Task, queueName string) (*Task, error) { req, err := newAddReq(c, task, queueName) if err != nil { return nil, err } res := &pb.TaskQueueAddResponse{} if err := internal.Call(c, "taskqueue", "Add", req, res); err != nil { apiErr, ok := err.(*internal.APIError) if ok && alreadyAddedErrors[pb.TaskQueueServiceError_ErrorCode(apiErr.Code)] { return nil, ErrTaskAlreadyAdded } return nil, err } resultTask := *task resultTask.Method = task.method() if task.Name == "" { resultTask.Name = string(res.ChosenTaskName) } return &resultTask, nil } // AddMulti adds multiple tasks to a named queue. // An empty queue name means that the default queue will be used. // AddMulti returns a slice of equivalent tasks with defaults filled in, including setting // each task's Name field to the chosen name if the original was empty. // If a given task is badly formed or could not be added, an appengine.MultiError is returned. func AddMulti(c context.Context, tasks []*Task, queueName string) ([]*Task, error) { req := &pb.TaskQueueBulkAddRequest{ AddRequest: make([]*pb.TaskQueueAddRequest, len(tasks)), } me, any := make(appengine.MultiError, len(tasks)), false for i, t := range tasks { req.AddRequest[i], me[i] = newAddReq(c, t, queueName) any = any || me[i] != nil } if any { return nil, me } res := &pb.TaskQueueBulkAddResponse{} if err := internal.Call(c, "taskqueue", "BulkAdd", req, res); err != nil { return nil, err } if len(res.Taskresult) != len(tasks) { return nil, errors.New("taskqueue: server error") } tasksOut := make([]*Task, len(tasks)) for i, tr := range res.Taskresult { tasksOut[i] = new(Task) *tasksOut[i] = *tasks[i] tasksOut[i].Method = tasksOut[i].method() if tasksOut[i].Name == "" { tasksOut[i].Name = string(tr.ChosenTaskName) } if *tr.Result != pb.TaskQueueServiceError_OK { if alreadyAddedErrors[*tr.Result] { me[i] = ErrTaskAlreadyAdded } else { me[i] = &internal.APIError{ Service: "taskqueue", Code: int32(*tr.Result), } } any = true } } if any { return tasksOut, me } return tasksOut, nil } // Delete deletes a task from a named queue. func Delete(c context.Context, task *Task, queueName string) error { err := DeleteMulti(c, []*Task{task}, queueName) if me, ok := err.(appengine.MultiError); ok { return me[0] } return err } // DeleteMulti deletes multiple tasks from a named queue. // If a given task could not be deleted, an appengine.MultiError is returned. // Each task is deleted independently; one may fail to delete while the others // are successfully deleted. func DeleteMulti(c context.Context, tasks []*Task, queueName string) error { taskNames := make([][]byte, len(tasks)) for i, t := range tasks { taskNames[i] = []byte(t.Name) } if queueName == "" { queueName = "default" } req := &pb.TaskQueueDeleteRequest{ QueueName: []byte(queueName), TaskName: taskNames, } res := &pb.TaskQueueDeleteResponse{} if err := internal.Call(c, "taskqueue", "Delete", req, res); err != nil { return err } if a, b := len(req.TaskName), len(res.Result); a != b { return fmt.Errorf("taskqueue: internal error: requested deletion of %d tasks, got %d results", a, b) } me, any := make(appengine.MultiError, len(res.Result)), false for i, ec := range res.Result { if ec != pb.TaskQueueServiceError_OK { me[i] = &internal.APIError{ Service: "taskqueue", Code: int32(ec), } any = true } } if any { return me } return nil } func lease(c context.Context, maxTasks int, queueName string, leaseTime int, groupByTag bool, tag []byte) ([]*Task, error) { if queueName == "" { queueName = "default" } req := &pb.TaskQueueQueryAndOwnTasksRequest{ QueueName: []byte(queueName), LeaseSeconds: proto.Float64(float64(leaseTime)), MaxTasks: proto.Int64(int64(maxTasks)), GroupByTag: proto.Bool(groupByTag), Tag: tag, } res := &pb.TaskQueueQueryAndOwnTasksResponse{} if err := internal.Call(c, "taskqueue", "QueryAndOwnTasks", req, res); err != nil { return nil, err } tasks := make([]*Task, len(res.Task)) for i, t := range res.Task { tasks[i] = &Task{ Payload: t.Body, Name: string(t.TaskName), Method: "PULL", ETA: time.Unix(0, *t.EtaUsec*1e3), RetryCount: *t.RetryCount, Tag: string(t.Tag), } } return tasks, nil } // Lease leases tasks from a queue. // leaseTime is in seconds. // The number of tasks fetched will be at most maxTasks. func Lease(c context.Context, maxTasks int, queueName string, leaseTime int) ([]*Task, error) { return lease(c, maxTasks, queueName, leaseTime, false, nil) } // LeaseByTag leases tasks from a queue, grouped by tag. // If tag is empty, then the returned tasks are grouped by the tag of the task with earliest ETA. // leaseTime is in seconds. // The number of tasks fetched will be at most maxTasks. func LeaseByTag(c context.Context, maxTasks int, queueName string, leaseTime int, tag string) ([]*Task, error) { return lease(c, maxTasks, queueName, leaseTime, true, []byte(tag)) } // Purge removes all tasks from a queue. func Purge(c context.Context, queueName string) error { if queueName == "" { queueName = "default" } req := &pb.TaskQueuePurgeQueueRequest{ QueueName: []byte(queueName), } res := &pb.TaskQueuePurgeQueueResponse{} return internal.Call(c, "taskqueue", "PurgeQueue", req, res) } // ModifyLease modifies the lease of a task. // Used to request more processing time, or to abandon processing. // leaseTime is in seconds and must not be negative. func ModifyLease(c context.Context, task *Task, queueName string, leaseTime int) error { if queueName == "" { queueName = "default" } req := &pb.TaskQueueModifyTaskLeaseRequest{ QueueName: []byte(queueName), TaskName: []byte(task.Name), EtaUsec: proto.Int64(task.ETA.UnixNano() / 1e3), // Used to verify ownership. LeaseSeconds: proto.Float64(float64(leaseTime)), } res := &pb.TaskQueueModifyTaskLeaseResponse{} if err := internal.Call(c, "taskqueue", "ModifyTaskLease", req, res); err != nil { return err } task.ETA = time.Unix(0, *res.UpdatedEtaUsec*1e3) return nil } // QueueStatistics represents statistics about a single task queue. type QueueStatistics struct { Tasks int // may be an approximation OldestETA time.Time // zero if there are no pending tasks Executed1Minute int // tasks executed in the last minute InFlight int // tasks executing now EnforcedRate float64 // requests per second } // QueueStats retrieves statistics about queues. func QueueStats(c context.Context, queueNames []string) ([]QueueStatistics, error) { req := &pb.TaskQueueFetchQueueStatsRequest{ QueueName: make([][]byte, len(queueNames)), } for i, q := range queueNames { if q == "" { q = "default" } req.QueueName[i] = []byte(q) } res := &pb.TaskQueueFetchQueueStatsResponse{} if err := internal.Call(c, "taskqueue", "FetchQueueStats", req, res); err != nil { return nil, err } qs := make([]QueueStatistics, len(res.Queuestats)) for i, qsg := range res.Queuestats { qs[i] = QueueStatistics{ Tasks: int(*qsg.NumTasks), } if eta := *qsg.OldestEtaUsec; eta > -1 { qs[i].OldestETA = time.Unix(0, eta*1e3) } if si := qsg.ScannerInfo; si != nil { qs[i].Executed1Minute = int(*si.ExecutedLastMinute) qs[i].InFlight = int(si.GetRequestsInFlight()) qs[i].EnforcedRate = si.GetEnforcedRate() } } return qs, nil } func setTransaction(x *pb.TaskQueueAddRequest, t *dspb.Transaction) { x.Transaction = t } func init() { internal.RegisterErrorCodeMap("taskqueue", pb.TaskQueueServiceError_ErrorCode_name) // Datastore error codes are shifted by DATASTORE_ERROR when presented through taskqueue. dsCode := int32(pb.TaskQueueServiceError_DATASTORE_ERROR) + int32(dspb.Error_TIMEOUT) internal.RegisterTimeoutErrorCode("taskqueue", dsCode) // Transaction registration. internal.RegisterTransactionSetter(setTransaction) internal.RegisterTransactionSetter(func(x *pb.TaskQueueBulkAddRequest, t *dspb.Transaction) { for _, req := range x.AddRequest { setTransaction(req, t) } }) }
delay
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/delay/delay_test.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 delay import ( "bytes" "context" "encoding/gob" "errors" "fmt" "net/http" "net/http/httptest" "os" "path/filepath" "reflect" "testing" "github.com/golang/protobuf/proto" "google.golang.org/appengine/v2/internal" "google.golang.org/appengine/v2/taskqueue" ) type CustomType struct { N int } type CustomInterface interface { N() int } type CustomImpl int func (c CustomImpl) N() int { return int(c) } // CustomImpl needs to be registered with gob. func init() { gob.Register(CustomImpl(0)) } var ( regFRuns = 0 regFMsg = "" regF = func(c context.Context, arg string) { regFRuns++ regFMsg = arg } regFunc = Func("regFunc", regF) regRegister = MustRegister("regRegister", regF) custFTally = 0 custF = func(c context.Context, ct *CustomType, ci CustomInterface) { a, b := 2, 3 if ct != nil { a = ct.N } if ci != nil { b = ci.N() } custFTally += a + b } custFunc = Func("custFunc", custF) custRegister = MustRegister("custRegister", custF) anotherCustFunc = Func("custFunc2", func(c context.Context, n int, ct *CustomType, ci CustomInterface) { }) varFMsg = "" varF = func(c context.Context, format string, args ...int) { // convert []int to []interface{} for fmt.Sprintf. as := make([]interface{}, len(args)) for i, a := range args { as[i] = a } varFMsg = fmt.Sprintf(format, as...) } varFunc = Func("variadicFunc", varF) varRegister = MustRegister("variadicRegister", varF) errFRuns = 0 errFErr = errors.New("error!") errF = func(c context.Context) error { errFRuns++ if errFRuns == 1 { return nil } return errFErr } errFunc = Func("errFunc", errF) errRegister = MustRegister("errRegister", errF) dupeWhich = 0 dupe1F = func(c context.Context) { if dupeWhich == 0 { dupeWhich = 1 } } dupe1Func = Func("dupe", dupe1F) dupe2F = func(c context.Context) { if dupeWhich == 0 { dupeWhich = 2 } } dupe2Func = Func("dupe", dupe2F) requestFuncRuns = 0 requestFuncHeaders *taskqueue.RequestHeaders requestFuncErr error requestF = func(c context.Context) { requestFuncRuns++ requestFuncHeaders, requestFuncErr = RequestHeaders(c) } requestFunc = Func("requestFunc", requestF) requestRegister = MustRegister("requestRegister", requestF) contextRuns = 0 contextF = func(c context.Context) { contextRuns++ } contextFunc = Func("contextFunc", contextF) contextRegister = MustRegister("contextRegister", contextF) ) type fakeContext struct { ctx context.Context logging [][]interface{} } func newFakeContext() *fakeContext { f := new(fakeContext) f.ctx = internal.WithCallOverride(context.Background(), f.call) f.ctx = internal.WithLogOverride(f.ctx, f.logf) return f } func (f *fakeContext) call(ctx context.Context, service, method string, in, out proto.Message) error { panic("should never be called") } var logLevels = map[int64]string{1: "INFO", 3: "ERROR"} func (f *fakeContext) logf(level int64, format string, args ...interface{}) { f.logging = append(f.logging, append([]interface{}{logLevels[level], format}, args...)) } func TestInvalidFunction(t *testing.T) { c := newFakeContext() invalidFunc := Func("invalid", func() {}) if got, want := invalidFunc.Call(c.ctx), fmt.Errorf("delay: func is invalid: %s", errFirstArg); got.Error() != want.Error() { t.Errorf("Incorrect error: got %q, want %q", got, want) } } func TestVariadicFunctionArguments(t *testing.T) { // Check the argument type validation for variadic functions. c := newFakeContext() calls := 0 taskqueueAdder = func(c context.Context, t *taskqueue.Task, _ string) (*taskqueue.Task, error) { calls++ return t, nil } for _, testTarget := range []*Function{varFunc, varRegister} { // reset state calls = 0 testTarget.Call(c.ctx, "hi") testTarget.Call(c.ctx, "%d", 12) testTarget.Call(c.ctx, "%d %d %d", 3, 1, 4) if calls != 3 { t.Errorf("Got %d calls to taskqueueAdder, want 3", calls) } if got, want := testTarget.Call(c.ctx, "%d %s", 12, "a string is bad"), errors.New("delay: argument 3 has wrong type: string is not assignable to int"); got.Error() != want.Error() { t.Errorf("Incorrect error: got %q, want %q", got, want) } } } func TestBadArguments(t *testing.T) { // Try running regFunc with different sets of inappropriate arguments. c := newFakeContext() tests := []struct { args []interface{} // all except context wantErr string }{ { args: nil, wantErr: "delay: too few arguments to func: 1 < 2", }, { args: []interface{}{"lala", 53}, wantErr: "delay: too many arguments to func: 3 > 2", }, { args: []interface{}{53}, wantErr: "delay: argument 1 has wrong type: int is not assignable to string", }, } for _, testTarget := range []*Function{regFunc, regRegister} { for i, tc := range tests { got := testTarget.Call(c.ctx, tc.args...) if got.Error() != tc.wantErr { t.Errorf("Call %v: got %q, want %q", i, got, tc.wantErr) } } } } func TestRunningFunction(t *testing.T) { c := newFakeContext() // Fake out the adding of a task. var task *taskqueue.Task taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { if queue != "" { t.Errorf(`Got queue %q, expected ""`, queue) } task = tk return tk, nil } for _, testTarget := range []*Function{regFunc, regRegister} { regFRuns, regFMsg = 0, "" // reset state const msg = "Why, hello!" testTarget.Call(c.ctx, msg) // Simulate the Task Queue service. req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) if regFRuns != 1 { t.Errorf("regFuncRuns: got %d, want 1", regFRuns) } if regFMsg != msg { t.Errorf("regFuncMsg: got %q, want %q", regFMsg, msg) } } } func TestCustomType(t *testing.T) { c := newFakeContext() // Fake out the adding of a task. var task *taskqueue.Task taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { if queue != "" { t.Errorf(`Got queue %q, expected ""`, queue) } task = tk return tk, nil } for _, testTarget := range []*Function{custFunc, custRegister} { custFTally = 0 // reset state testTarget.Call(c.ctx, &CustomType{N: 11}, CustomImpl(13)) // Simulate the Task Queue service. req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) if custFTally != 24 { t.Errorf("custFTally = %d, want 24", custFTally) } // Try the same, but with nil values; one is a nil pointer (and thus a non-nil interface value), // and the other is a nil interface value. custFTally = 0 // reset state testTarget.Call(c.ctx, (*CustomType)(nil), nil) // Simulate the Task Queue service. req, err = http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw = httptest.NewRecorder() runFunc(c.ctx, rw, req) if custFTally != 5 { t.Errorf("custFTally = %d, want 5", custFTally) } } } func TestRunningVariadic(t *testing.T) { c := newFakeContext() // Fake out the adding of a task. var task *taskqueue.Task taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { if queue != "" { t.Errorf(`Got queue %q, expected ""`, queue) } task = tk return tk, nil } for _, testTarget := range []*Function{varFunc, varRegister} { varFMsg = "" // reset state testTarget.Call(c.ctx, "Amiga %d has %d KB RAM", 500, 512) // Simulate the Task Queue service. req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) const expected = "Amiga 500 has 512 KB RAM" if varFMsg != expected { t.Errorf("varFMsg = %q, want %q", varFMsg, expected) } } } func TestErrorFunction(t *testing.T) { c := newFakeContext() // Fake out the adding of a task. var task *taskqueue.Task taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { if queue != "" { t.Errorf(`Got queue %q, expected ""`, queue) } task = tk return tk, nil } for _, testTarget := range []*Function{errFunc, errRegister} { // reset state c.logging = [][]interface{}{} errFRuns = 0 testTarget.Call(c.ctx) // Simulate the Task Queue service. // The first call should succeed; the second call should fail. { req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) } { req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) if rw.Code != http.StatusInternalServerError { t.Errorf("Got status code %d, want %d", rw.Code, http.StatusInternalServerError) } wantLogging := [][]interface{}{ {"ERROR", "delay: func failed (will retry): %v", errFErr}, } if !reflect.DeepEqual(c.logging, wantLogging) { t.Errorf("Incorrect logging: got %+v, want %+v", c.logging, wantLogging) } } } } func TestFuncDuplicateFunction(t *testing.T) { c := newFakeContext() // Fake out the adding of a task. var task *taskqueue.Task taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { if queue != "" { t.Errorf(`Got queue %q, expected ""`, queue) } task = tk return tk, nil } if err := dupe1Func.Call(c.ctx); err == nil { t.Error("dupe1Func.Call did not return error") } if task != nil { t.Error("dupe1Func.Call posted a task") } if err := dupe2Func.Call(c.ctx); err != nil { t.Errorf("dupe2Func.Call error: %v", err) } if task == nil { t.Fatalf("dupe2Func.Call did not post a task") } // Simulate the Task Queue service. req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) if dupeWhich == 1 { t.Error("dupe2Func.Call used old registered function") } else if dupeWhich != 2 { t.Errorf("dupeWhich = %d; want 2", dupeWhich) } } func TestMustRegisterDuplicateFunction(t *testing.T) { MustRegister("dupe", dupe1F) defer func() { err := recover() if err == nil { t.Error("MustRegister did not panic") } got := fmt.Sprintf("%s", err) want := fmt.Sprintf("multiple functions registered for %q", "dupe") if got != want { t.Errorf("Incorrect error: got %q, want %q", got, want) } }() MustRegister("dupe", dupe2F) } func TestInvalidFunction_MustRegister(t *testing.T) { defer func() { err := recover() if err == nil { t.Error("MustRegister did not panic") } if err != errFirstArg { t.Errorf("Incorrect error: got %q, want %q", err, errFirstArg) } }() MustRegister("invalid", func() {}) } func TestGetRequestHeadersFromContext(t *testing.T) { for _, testTarget := range []*Function{requestFunc, requestRegister} { c := newFakeContext() // Outside a delay.Func should return an error. headers, err := RequestHeaders(c.ctx) if headers != nil { t.Errorf("RequestHeaders outside Func, got %v, want nil", headers) } if err != errOutsideDelayFunc { t.Errorf("RequestHeaders outside Func err, got %v, want %v", err, errOutsideDelayFunc) } // Fake out the adding of a task. var task *taskqueue.Task taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { if queue != "" { t.Errorf(`Got queue %q, expected ""`, queue) } task = tk return tk, nil } testTarget.Call(c.ctx) requestFuncRuns, requestFuncHeaders = 0, nil // reset state // Simulate the Task Queue service. req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) req.Header.Set("x-appengine-taskname", "foobar") if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) if requestFuncRuns != 1 { t.Errorf("requestFuncRuns: got %d, want 1", requestFuncRuns) } if requestFuncHeaders.TaskName != "foobar" { t.Errorf("requestFuncHeaders.TaskName: got %v, want 'foobar'", requestFuncHeaders.TaskName) } if requestFuncErr != nil { t.Errorf("requestFuncErr: got %v, want nil", requestFuncErr) } } } func TestStandardContext(t *testing.T) { // Fake out the adding of a task. var task *taskqueue.Task taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { if queue != "" { t.Errorf(`Got queue %q, expected ""`, queue) } task = tk return tk, nil } for _, testTarget := range []*Function{contextFunc, contextRegister} { c := newFakeContext() contextRuns = 0 // reset state if err := testTarget.Call(c.ctx); err != nil { t.Fatal("Function.Call:", err) } // Simulate the Task Queue service. req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) if err != nil { t.Fatalf("Failed making http.Request: %v", err) } rw := httptest.NewRecorder() runFunc(c.ctx, rw, req) if contextRuns != 1 { t.Errorf("contextRuns: got %d, want 1", contextRuns) } } } func TestFileKey(t *testing.T) { const firstGenTest = 0 tests := []struct { mainPath string file string want string }{ // first-gen { "", filepath.FromSlash("srv/foo.go"), filepath.FromSlash("srv/foo.go"), }, // gopath { filepath.FromSlash("/tmp/staging1234/srv/"), filepath.FromSlash("/tmp/staging1234/srv/foo.go"), "foo.go", }, { filepath.FromSlash("/tmp/staging1234/srv/_gopath/src/example.com/foo"), filepath.FromSlash("/tmp/staging1234/srv/_gopath/src/example.com/foo/foo.go"), "foo.go", }, { filepath.FromSlash("/tmp/staging2234/srv/_gopath/src/example.com/foo"), filepath.FromSlash("/tmp/staging2234/srv/_gopath/src/example.com/foo/bar/bar.go"), filepath.FromSlash("example.com/foo/bar/bar.go"), }, { filepath.FromSlash("/tmp/staging3234/srv/_gopath/src/example.com/foo"), filepath.FromSlash("/tmp/staging3234/srv/_gopath/src/example.com/bar/main.go"), filepath.FromSlash("example.com/bar/main.go"), }, { filepath.FromSlash("/tmp/staging3234/srv/gopath/src/example.com/foo"), filepath.FromSlash("/tmp/staging3234/srv/gopath/src/example.com/bar/main.go"), filepath.FromSlash("example.com/bar/main.go"), }, { filepath.FromSlash(""), filepath.FromSlash("/tmp/staging3234/srv/gopath/src/example.com/bar/main.go"), filepath.FromSlash("example.com/bar/main.go"), }, // go mod, same package { filepath.FromSlash("/tmp/staging3234/srv"), filepath.FromSlash("/tmp/staging3234/srv/main.go"), "main.go", }, { filepath.FromSlash("/tmp/staging3234/srv"), filepath.FromSlash("/tmp/staging3234/srv/bar/main.go"), filepath.FromSlash("bar/main.go"), }, { filepath.FromSlash("/tmp/staging3234/srv/cmd"), filepath.FromSlash("/tmp/staging3234/srv/cmd/main.go"), "main.go", }, { filepath.FromSlash("/tmp/staging3234/srv/cmd"), filepath.FromSlash("/tmp/staging3234/srv/bar/main.go"), filepath.FromSlash("bar/main.go"), }, { filepath.FromSlash(""), filepath.FromSlash("/tmp/staging3234/srv/bar/main.go"), filepath.FromSlash("bar/main.go"), }, // go mod, other package { filepath.FromSlash("/tmp/staging3234/srv"), filepath.FromSlash("/go/pkg/mod/github.com/foo/bar@v0.0.0-20181026220418-f595d03440dc/baz.go"), filepath.FromSlash("github.com/foo/bar/baz.go"), }, } for i, tc := range tests { if i > firstGenTest { os.Setenv("GAE_ENV", "standard") } internal.MainPath = tc.mainPath got, err := fileKey(tc.file) if err != nil { t.Errorf("Unexpected error, call %v, file %q: %v", i, tc.file, err) continue } if got != tc.want { t.Errorf("Call %v, file %q: got %q, want %q", i, tc.file, got, tc.want) } } }
delay
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/v2/delay/delay.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 delay provides a way to execute code outside of the scope of a user request by using the Task Queue API. To use a deferred function, you must register the function to be deferred as a top-level var. For example, ``` var laterFunc = delay.MustRegister("key", myFunc) func myFunc(ctx context.Context, a, b string) {...} ``` You can also inline with a function literal: ``` var laterFunc = delay.MustRegister("key", func(ctx context.Context, a, b string) {...}) ``` In the above example, "key" is a logical name for the function. The key needs to be globally unique across your entire application. To invoke the function in a deferred fashion, call the top-level item: ``` laterFunc(ctx, "aaa", "bbb") ``` This will queue a task and return quickly; the function will be actually run in a new request. The delay package uses the Task Queue API to create tasks that call the reserved application path "/_ah/queue/go/delay". This path may only be marked as "login: admin" or have no access restriction; it will fail if marked as "login: required". */ package delay // import "google.golang.org/appengine/v2/delay" import ( "bytes" "context" "encoding/gob" "errors" "fmt" "go/build" stdlog "log" "net/http" "path/filepath" "reflect" "regexp" "runtime" "strings" "google.golang.org/appengine/v2" "google.golang.org/appengine/v2/internal" "google.golang.org/appengine/v2/log" "google.golang.org/appengine/v2/taskqueue" ) // Function represents a function that may have a delayed invocation. type Function struct { fv reflect.Value // Kind() == reflect.Func key string err error // any error during initialization } const ( // The HTTP path for invocations. path = "/_ah/queue/go/delay" // Use the default queue. queue = "" ) type contextKey int var ( // registry of all delayed functions funcs = make(map[string]*Function) // precomputed types errorType = reflect.TypeOf((*error)(nil)).Elem() // errors errFirstArg = errors.New("first argument must be context.Context") errOutsideDelayFunc = errors.New("request headers are only available inside a delay.Func") // context keys headersContextKey contextKey = 0 stdContextType = reflect.TypeOf((*context.Context)(nil)).Elem() ) func isContext(t reflect.Type) bool { return t == stdContextType } var modVersionPat = regexp.MustCompile("@v[^/]+") // fileKey finds a stable representation of the caller's file path. // For calls from package main: strip all leading path entries, leaving just the filename. // For calls from anywhere else, strip $GOPATH/src, leaving just the package path and file path. func fileKey(file string) (string, error) { if !internal.IsSecondGen() { return file, nil } // If the caller is in the same Dir as mainPath, then strip everything but the file name. if filepath.Dir(file) == internal.MainPath { return filepath.Base(file), nil } // If the path contains "gopath/src/", which is what the builder uses for // apps which don't use go modules, strip everything up to and including src. // Or, if the path starts with /tmp/staging, then we're importing a package // from the app's module (and we must be using go modules), and we have a // path like /tmp/staging1234/srv/... so strip everything up to and // including the first /srv/. // And be sure to look at the GOPATH, for local development. s := string(filepath.Separator) for _, s := range []string{filepath.Join("gopath", "src") + s, s + "srv" + s, filepath.Join(build.Default.GOPATH, "src") + s} { if idx := strings.Index(file, s); idx > 0 { return file[idx+len(s):], nil } } // Finally, if that all fails then we must be using go modules, and the file is a module, // so the path looks like /go/pkg/mod/github.com/foo/bar@v0.0.0-20181026220418-f595d03440dc/baz.go // So... remove everything up to and including mod, plus the @.... version string. m := "/mod/" if idx := strings.Index(file, m); idx > 0 { file = file[idx+len(m):] } else { return file, fmt.Errorf("fileKey: unknown file path format for %q", file) } return modVersionPat.ReplaceAllString(file, ""), nil } // Func declares a new function that can be called in a deferred fashion. // The second argument i must be a function with the first argument of // type context.Context. // To make the key globally unique, the SDK code will combine "key" with // the filename of the file in which myFunc is defined // (e.g., /some/path/myfile.go). This is convenient, but can lead to // failed deferred tasks if you refactor your code, or change from // GOPATH to go.mod, and then re-deploy with in-flight deferred tasks. // // This function Func must be called in a global scope to properly // register the function with the framework. // // Deprecated: Use MustRegister instead. func Func(key string, i interface{}) *Function { // Derive unique, somewhat stable key for this func. _, file, _, _ := runtime.Caller(1) fk, err := fileKey(file) if err != nil { // Not fatal, but log the error stdlog.Printf("delay: %v", err) } key = fk + ":" + key f, err := registerFunction(key, i) if err != nil { return f } if old := funcs[f.key]; old != nil { old.err = fmt.Errorf("multiple functions registered for %s", key) } funcs[f.key] = f return f } // MustRegister declares a new function that can be called in a deferred fashion. // The second argument i must be a function with the first argument of // type context.Context. // MustRegister requires the key to be globally unique. // // This function MustRegister must be called in a global scope to properly // register the function with the framework. // See the package notes above for more details. func MustRegister(key string, i interface{}) *Function { f, err := registerFunction(key, i) if err != nil { panic(err) } if old := funcs[f.key]; old != nil { panic(fmt.Errorf("multiple functions registered for %q", key)) } funcs[f.key] = f return f } func registerFunction(key string, i interface{}) (*Function, error) { f := &Function{fv: reflect.ValueOf(i)} f.key = key t := f.fv.Type() if t.Kind() != reflect.Func { f.err = errors.New("not a function") return f, f.err } if t.NumIn() == 0 || !isContext(t.In(0)) { f.err = errFirstArg return f, errFirstArg } // Register the function's arguments with the gob package. // This is required because they are marshaled inside a []interface{}. // gob.Register only expects to be called during initialization; // that's fine because this function expects the same. for i := 0; i < t.NumIn(); i++ { // Only concrete types may be registered. If the argument has // interface type, the client is resposible for registering the // concrete types it will hold. if t.In(i).Kind() == reflect.Interface { continue } gob.Register(reflect.Zero(t.In(i)).Interface()) } return f, nil } type invocation struct { Key string Args []interface{} } // Call invokes a delayed function. // // err := f.Call(c, ...) // // is equivalent to // // t, _ := f.Task(...) // _, err := taskqueue.Add(c, t, "") func (f *Function) Call(c context.Context, args ...interface{}) error { t, err := f.Task(args...) if err != nil { return err } _, err = taskqueueAdder(c, t, queue) return err } // Task creates a Task that will invoke the function. // Its parameters may be tweaked before adding it to a queue. // Users should not modify the Path or Payload fields of the returned Task. func (f *Function) Task(args ...interface{}) (*taskqueue.Task, error) { if f.err != nil { return nil, fmt.Errorf("delay: func is invalid: %v", f.err) } nArgs := len(args) + 1 // +1 for the context.Context ft := f.fv.Type() minArgs := ft.NumIn() if ft.IsVariadic() { minArgs-- } if nArgs < minArgs { return nil, fmt.Errorf("delay: too few arguments to func: %d < %d", nArgs, minArgs) } if !ft.IsVariadic() && nArgs > minArgs { return nil, fmt.Errorf("delay: too many arguments to func: %d > %d", nArgs, minArgs) } // Check arg types. for i := 1; i < nArgs; i++ { at := reflect.TypeOf(args[i-1]) var dt reflect.Type if i < minArgs { // not a variadic arg dt = ft.In(i) } else { // a variadic arg dt = ft.In(minArgs).Elem() } // nil arguments won't have a type, so they need special handling. if at == nil { // nil interface switch dt.Kind() { case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: continue // may be nil } return nil, fmt.Errorf("delay: argument %d has wrong type: %v is not nilable", i, dt) } switch at.Kind() { case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: av := reflect.ValueOf(args[i-1]) if av.IsNil() { // nil value in interface; not supported by gob, so we replace it // with a nil interface value args[i-1] = nil } } if !at.AssignableTo(dt) { return nil, fmt.Errorf("delay: argument %d has wrong type: %v is not assignable to %v", i, at, dt) } } inv := invocation{ Key: f.key, Args: args, } buf := new(bytes.Buffer) if err := gob.NewEncoder(buf).Encode(inv); err != nil { return nil, fmt.Errorf("delay: gob encoding failed: %v", err) } return &taskqueue.Task{ Path: path, Payload: buf.Bytes(), }, nil } // RequestHeaders returns the special task-queue HTTP request headers for the current // task queue handler. Returns an error if called from outside a delay.Func. func RequestHeaders(c context.Context) (*taskqueue.RequestHeaders, error) { if ret, ok := c.Value(headersContextKey).(*taskqueue.RequestHeaders); ok { return ret, nil } return nil, errOutsideDelayFunc } var taskqueueAdder = taskqueue.Add // for testing func init() { http.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { runFunc(appengine.NewContext(req), w, req) }) } func runFunc(c context.Context, w http.ResponseWriter, req *http.Request) { defer req.Body.Close() c = context.WithValue(c, headersContextKey, taskqueue.ParseRequestHeaders(req.Header)) var inv invocation if err := gob.NewDecoder(req.Body).Decode(&inv); err != nil { log.Errorf(c, "delay: failed decoding task payload: %v", err) log.Warningf(c, "delay: dropping task") return } f := funcs[inv.Key] if f == nil { log.Errorf(c, "delay: no func with key %q found", inv.Key) log.Warningf(c, "delay: dropping task") return } ft := f.fv.Type() in := []reflect.Value{reflect.ValueOf(c)} for _, arg := range inv.Args { var v reflect.Value if arg != nil { v = reflect.ValueOf(arg) } else { // Task was passed a nil argument, so we must construct // the zero value for the argument here. n := len(in) // we're constructing the nth argument var at reflect.Type if !ft.IsVariadic() || n < ft.NumIn()-1 { at = ft.In(n) } else { at = ft.In(ft.NumIn() - 1).Elem() } v = reflect.Zero(at) } in = append(in, v) } out := f.fv.Call(in) if n := ft.NumOut(); n > 0 && ft.Out(n-1) == errorType { if errv := out[n-1]; !errv.IsNil() { log.Errorf(c, "delay: func failed (will retry): %v", errv.Interface()) w.WriteHeader(http.StatusInternalServerError) return } } }
aetest
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/aetest/instance_classic.go
//go:build appengine // +build appengine package aetest import "appengine/aetest" // NewInstance launches a running instance of api_server.py which can be used // for multiple test Contexts that delegate all App Engine API calls to that // instance. // If opts is nil the default values are used. func NewInstance(opts *Options) (Instance, error) { aetest.PrepareDevAppserver = PrepareDevAppserver var aeOpts *aetest.Options if opts != nil { aeOpts = &aetest.Options{ AppID: opts.AppID, StronglyConsistentDatastore: opts.StronglyConsistentDatastore, } } return aetest.NewInstance(aeOpts) }
aetest
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/appengine/aetest/user.go
package aetest import ( "hash/crc32" "net/http" "strconv" "google.golang.org/appengine/user" ) // Login causes the provided Request to act as though issued by the given user. func Login(u *user.User, req *http.Request) { req.Header.Set("X-AppEngine-User-Email", u.Email) id := u.ID if id == "" { id = strconv.Itoa(int(crc32.Checksum([]byte(u.Email), crc32.IEEETable))) } req.Header.Set("X-AppEngine-User-Id", id) req.Header.Set("X-AppEngine-Federated-Identity", u.FederatedIdentity) req.Header.Set("X-AppEngine-Federated-Provider", u.FederatedProvider) // NOTE: the following two headers are wrong, but are preserved to not break legacy tests. req.Header.Set("X-AppEngine-User-Federated-Identity", u.Email) req.Header.Set("X-AppEngine-User-Federated-Provider", u.FederatedProvider) if u.Admin { req.Header.Set("X-AppEngine-User-Is-Admin", "1") } else { req.Header.Set("X-AppEngine-User-Is-Admin", "0") } } // Logout causes the provided Request to act as though issued by a logged-out // user. func Logout(req *http.Request) { req.Header.Del("X-AppEngine-User-Email") req.Header.Del("X-AppEngine-User-Id") req.Header.Del("X-AppEngine-User-Is-Admin") req.Header.Del("X-AppEngine-Federated-Identity") req.Header.Del("X-AppEngine-Federated-Provider") // NOTE: the following two headers are wrong, but are preserved to not break legacy tests. req.Header.Del("X-AppEngine-User-Federated-Identity") req.Header.Del("X-AppEngine-User-Federated-Provider") }