// Code generated by protoc-gen-go. // source: google/protobuf/struct.proto // DO NOT EDIT! package google_protobuf import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // `NullValue` is a singleton enumeration to represent the null value for the // `Value` type union. // // The JSON representation for `NullValue` is JSON `null`. type NullValue int32 const ( // Null value. NullValue_NULL_VALUE NullValue = 0 ) var NullValue_name = map[int32]string{ 0: "NULL_VALUE", } var NullValue_value = map[string]int32{ "NULL_VALUE": 0, } func (x NullValue) String() string { return proto.EnumName(NullValue_name, int32(x)) } func (NullValue) EnumDescriptor() ([]byte, []int) { return fileDescriptor6, []int{0} } func (NullValue) XXX_WellKnownType() string { return "NullValue" } // `Struct` represents a structured data value, consisting of fields // which map to dynamically typed values. In some languages, `Struct` // might be supported by a native representation. For example, in // scripting languages like JS a struct is represented as an // object. The details of that representation are described together // with the proto support for the language. // // The JSON representation for `Struct` is JSON object. type Struct struct { // Map of dynamically typed values. Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *Struct) Reset() { *m = Struct{} } func (m *Struct) String() string { return proto.CompactTextString(m) } func (*Struct) ProtoMessage() {} func (*Struct) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} } func (*Struct) XXX_WellKnownType() string { return "Struct" } func (m *Struct) GetFields() map[string]*Value { if m != nil { return m.Fields } return nil } // `Value` represents a dynamically typed value which can be either // null, a number, a string, a boolean, a recursive struct value, or a // list of values. A producer of value is expected to set one of that // variants, absence of any variant indicates an error. // // The JSON representation for `Value` is JSON value. type Value struct { // The kind of value. // // Types that are valid to be assigned to Kind: // *Value_NullValue // *Value_NumberValue // *Value_StringValue // *Value_BoolValue // *Value_StructValue // *Value_ListValue Kind isValue_Kind `protobuf_oneof:"kind"` } func (m *Value) Reset() { *m = Value{} } func (m *Value) String() string { return proto.CompactTextString(m) } func (*Value) ProtoMessage() {} func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} } func (*Value) XXX_WellKnownType() string { return "Value" } type isValue_Kind interface { isValue_Kind() } type Value_NullValue struct { NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"` } type Value_NumberValue struct { NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"` } type Value_StringValue struct { StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"` } type Value_BoolValue struct { BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"` } type Value_StructValue struct { StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"` } type Value_ListValue struct { ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"` } func (*Value_NullValue) isValue_Kind() {} func (*Value_NumberValue) isValue_Kind() {} func (*Value_StringValue) isValue_Kind() {} func (*Value_BoolValue) isValue_Kind() {} func (*Value_StructValue) isValue_Kind() {} func (*Value_ListValue) isValue_Kind() {} func (m *Value) GetKind() isValue_Kind { if m != nil { return m.Kind } return nil } func (m *Value) GetNullValue() NullValue { if x, ok := m.GetKind().(*Value_NullValue); ok { return x.NullValue } return NullValue_NULL_VALUE } func (m *Value) GetNumberValue() float64 { if x, ok := m.GetKind().(*Value_NumberValue); ok { return x.NumberValue } return 0 } func (m *Value) GetStringValue() string { if x, ok := m.GetKind().(*Value_StringValue); ok { return x.StringValue } return "" } func (m *Value) GetBoolValue() bool { if x, ok := m.GetKind().(*Value_BoolValue); ok { return x.BoolValue } return false } func (m *Value) GetStructValue() *Struct { if x, ok := m.GetKind().(*Value_StructValue); ok { return x.StructValue } return nil } func (m *Value) GetListValue() *ListValue { if x, ok := m.GetKind().(*Value_ListValue); ok { return x.ListValue } return nil } // XXX_OneofFuncs is for the internal use of the proto package. func (*Value) 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 _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ (*Value_NullValue)(nil), (*Value_NumberValue)(nil), (*Value_StringValue)(nil), (*Value_BoolValue)(nil), (*Value_StructValue)(nil), (*Value_ListValue)(nil), } } func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*Value) // kind switch x := m.Kind.(type) { case *Value_NullValue: b.EncodeVarint(1<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.NullValue)) case *Value_NumberValue: b.EncodeVarint(2<<3 | proto.WireFixed64) b.EncodeFixed64(math.Float64bits(x.NumberValue)) case *Value_StringValue: b.EncodeVarint(3<<3 | proto.WireBytes) b.EncodeStringBytes(x.StringValue) case *Value_BoolValue: t := uint64(0) if x.BoolValue { t = 1 } b.EncodeVarint(4<<3 | proto.WireVarint) b.EncodeVarint(t) case *Value_StructValue: b.EncodeVarint(5<<3 | proto.WireBytes) if err := b.EncodeMessage(x.StructValue); err != nil { return err } case *Value_ListValue: b.EncodeVarint(6<<3 | proto.WireBytes) if err := b.EncodeMessage(x.ListValue); err != nil { return err } case nil: default: return fmt.Errorf("Value.Kind has unexpected type %T", x) } return nil } func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*Value) switch tag { case 1: // kind.null_value if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Kind = &Value_NullValue{NullValue(x)} return true, err case 2: // kind.number_value if wire != proto.WireFixed64 { return true, proto.ErrInternalBadWireType } x, err := b.DecodeFixed64() m.Kind = &Value_NumberValue{math.Float64frombits(x)} return true, err case 3: // kind.string_value if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Kind = &Value_StringValue{x} return true, err case 4: // kind.bool_value if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Kind = &Value_BoolValue{x != 0} return true, err case 5: // kind.struct_value if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(Struct) err := b.DecodeMessage(msg) m.Kind = &Value_StructValue{msg} return true, err case 6: // kind.list_value if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(ListValue) err := b.DecodeMessage(msg) m.Kind = &Value_ListValue{msg} return true, err default: return false, nil } } func _Value_OneofSizer(msg proto.Message) (n int) { m := msg.(*Value) // kind switch x := m.Kind.(type) { case *Value_NullValue: n += proto.SizeVarint(1<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.NullValue)) case *Value_NumberValue: n += proto.SizeVarint(2<<3 | proto.WireFixed64) n += 8 case *Value_StringValue: n += proto.SizeVarint(3<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(len(x.StringValue))) n += len(x.StringValue) case *Value_BoolValue: n += proto.SizeVarint(4<<3 | proto.WireVarint) n += 1 case *Value_StructValue: s := proto.Size(x.StructValue) n += proto.SizeVarint(5<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *Value_ListValue: s := proto.Size(x.ListValue) n += proto.SizeVarint(6<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) } return n } // `ListValue` is a wrapper around a repeated field of values. // // The JSON representation for `ListValue` is JSON array. type ListValue struct { // Repeated field of dynamically typed values. Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` } func (m *ListValue) Reset() { *m = ListValue{} } func (m *ListValue) String() string { return proto.CompactTextString(m) } func (*ListValue) ProtoMessage() {} func (*ListValue) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} } func (*ListValue) XXX_WellKnownType() string { return "ListValue" } func (m *ListValue) GetValues() []*Value { if m != nil { return m.Values } return nil } func init() { proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") proto.RegisterType((*Value)(nil), "google.protobuf.Value") proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) } func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor6) } var fileDescriptor6 = []byte{ // 378 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0x4b, 0x4f, 0xe2, 0x50, 0x14, 0xc7, 0xb9, 0x2d, 0x34, 0xd3, 0xd3, 0x09, 0x43, 0x3a, 0xc9, 0x0c, 0x61, 0x26, 0x6a, 0x60, 0x43, 0x8c, 0x29, 0x09, 0x6e, 0x8c, 0xb8, 0xb1, 0x09, 0x62, 0x62, 0x43, 0x6a, 0x15, 0x5c, 0x12, 0x0b, 0x85, 0x34, 0x5c, 0xee, 0x25, 0x7d, 0x68, 0xf8, 0x26, 0x2e, 0x8d, 0x4b, 0x97, 0x7e, 0x42, 0xef, 0xa3, 0xad, 0x06, 0xc2, 0xee, 0x9e, 0xff, 0xf9, 0x9d, 0xff, 0x79, 0x5c, 0xf8, 0xbf, 0xa0, 0x74, 0x81, 0x83, 0xce, 0x3a, 0xa2, 0x09, 0xf5, 0xd3, 0x79, 0x27, 0x4e, 0xa2, 0x74, 0x9a, 0x58, 0x22, 0x36, 0x7f, 0xc9, 0xac, 0x95, 0x67, 0x9b, 0x2f, 0x08, 0xb4, 0x3b, 0x41, 0x98, 0x3d, 0xd0, 0xe6, 0x61, 0x80, 0x67, 0x71, 0x1d, 0x1d, 0xa9, 0x6d, 0xa3, 0xdb, 0xb2, 0xb6, 0x60, 0x4b, 0x82, 0xd6, 0x95, 0xa0, 0xfa, 0x24, 0x89, 0x36, 0x5e, 0x56, 0xd2, 0xb8, 0x05, 0xe3, 0x9b, 0x6c, 0xd6, 0x40, 0x5d, 0x06, 0x1b, 0x66, 0x84, 0xda, 0xba, 0xc7, 0x9f, 0xe6, 0x09, 0x54, 0x9e,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