github.com/whiteCcinn/protobuf-go@v1.0.9/types/known/structpb/struct.pb.go (about)

     1  // Protocol Buffers - Google's data interchange format
     2  // Copyright 2008 Google Inc.  All rights reserved.
     3  // https://developers.google.com/protocol-buffers/
     4  //
     5  // Redistribution and use in source and binary forms, with or without
     6  // modification, are permitted provided that the following conditions are
     7  // met:
     8  //
     9  //     * Redistributions of source code must retain the above copyright
    10  // notice, this list of conditions and the following disclaimer.
    11  //     * Redistributions in binary form must reproduce the above
    12  // copyright notice, this list of conditions and the following disclaimer
    13  // in the documentation and/or other materials provided with the
    14  // distribution.
    15  //     * Neither the name of Google Inc. nor the names of its
    16  // contributors may be used to endorse or promote products derived from
    17  // this software without specific prior written permission.
    18  //
    19  // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    20  // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    21  // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    22  // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    23  // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    24  // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    25  // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    26  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    27  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    28  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    29  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    30  
    31  // Code generated by protoc-gen-go. DO NOT EDIT.
    32  // source: google/protobuf/struct.proto
    33  
    34  // Package structpb contains generated types for google/protobuf/struct.proto.
    35  //
    36  // The messages (i.e., Value, Struct, and ListValue) defined in struct.proto are
    37  // used to represent arbitrary JSON. The Value message represents a JSON value,
    38  // the Struct message represents a JSON object, and the ListValue message
    39  // represents a JSON array. See https://json.org for more information.
    40  //
    41  // The Value, Struct, and ListValue types have generated MarshalJSON and
    42  // UnmarshalJSON methods such that they serialize JSON equivalent to what the
    43  // messages themselves represent. Use of these types with the
    44  // "github.com/whiteCcinn/protobuf-go/encoding/protojson" package
    45  // ensures that they will be serialized as their JSON equivalent.
    46  //
    47  // # Conversion to and from a Go interface
    48  //
    49  // The standard Go "encoding/json" package has functionality to serialize
    50  // arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and
    51  // ListValue.AsSlice methods can convert the protobuf message representation into
    52  // a form represented by interface{}, map[string]interface{}, and []interface{}.
    53  // This form can be used with other packages that operate on such data structures
    54  // and also directly with the standard json package.
    55  //
    56  // In order to convert the interface{}, map[string]interface{}, and []interface{}
    57  // forms back as Value, Struct, and ListValue messages, use the NewStruct,
    58  // NewList, and NewValue constructor functions.
    59  //
    60  // # Example usage
    61  //
    62  // Consider the following example JSON object:
    63  //
    64  //	{
    65  //		"firstName": "John",
    66  //		"lastName": "Smith",
    67  //		"isAlive": true,
    68  //		"age": 27,
    69  //		"address": {
    70  //			"streetAddress": "21 2nd Street",
    71  //			"city": "New York",
    72  //			"state": "NY",
    73  //			"postalCode": "10021-3100"
    74  //		},
    75  //		"phoneNumbers": [
    76  //			{
    77  //				"type": "home",
    78  //				"number": "212 555-1234"
    79  //			},
    80  //			{
    81  //				"type": "office",
    82  //				"number": "646 555-4567"
    83  //			}
    84  //		],
    85  //		"children": [],
    86  //		"spouse": null
    87  //	}
    88  //
    89  // To construct a Value message representing the above JSON object:
    90  //
    91  //	m, err := structpb.NewValue(map[string]interface{}{
    92  //		"firstName": "John",
    93  //		"lastName":  "Smith",
    94  //		"isAlive":   true,
    95  //		"age":       27,
    96  //		"address": map[string]interface{}{
    97  //			"streetAddress": "21 2nd Street",
    98  //			"city":          "New York",
    99  //			"state":         "NY",
   100  //			"postalCode":    "10021-3100",
   101  //		},
   102  //		"phoneNumbers": []interface{}{
   103  //			map[string]interface{}{
   104  //				"type":   "home",
   105  //				"number": "212 555-1234",
   106  //			},
   107  //			map[string]interface{}{
   108  //				"type":   "office",
   109  //				"number": "646 555-4567",
   110  //			},
   111  //		},
   112  //		"children": []interface{}{},
   113  //		"spouse":   nil,
   114  //	})
   115  //	if err != nil {
   116  //		... // handle error
   117  //	}
   118  //	... // make use of m as a *structpb.Value
   119  package structpb
   120  
   121  import (
   122  	base64 "encoding/base64"
   123  	protojson "github.com/whiteCcinn/protobuf-go/encoding/protojson"
   124  	protoreflect "github.com/whiteCcinn/protobuf-go/reflect/protoreflect"
   125  	protoimpl "github.com/whiteCcinn/protobuf-go/runtime/protoimpl"
   126  	math "math"
   127  	reflect "reflect"
   128  	sync "sync"
   129  	utf8 "unicode/utf8"
   130  )
   131  
   132  // `NullValue` is a singleton enumeration to represent the null value for the
   133  // `Value` type union.
   134  //
   135  //  The JSON representation for `NullValue` is JSON `null`.
   136  type NullValue int32
   137  
   138  const (
   139  	// Null value.
   140  	NullValue_NULL_VALUE NullValue = 0
   141  )
   142  
   143  // Enum value maps for NullValue.
   144  var (
   145  	NullValue_name = map[int32]string{
   146  		0: "NULL_VALUE",
   147  	}
   148  	NullValue_value = map[string]int32{
   149  		"NULL_VALUE": 0,
   150  	}
   151  )
   152  
   153  func (x NullValue) Enum() *NullValue {
   154  	p := new(NullValue)
   155  	*p = x
   156  	return p
   157  }
   158  
   159  func (x NullValue) String() string {
   160  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   161  }
   162  
   163  func (NullValue) Descriptor() protoreflect.EnumDescriptor {
   164  	return file_google_protobuf_struct_proto_enumTypes[0].Descriptor()
   165  }
   166  
   167  func (NullValue) Type() protoreflect.EnumType {
   168  	return &file_google_protobuf_struct_proto_enumTypes[0]
   169  }
   170  
   171  func (x NullValue) Number() protoreflect.EnumNumber {
   172  	return protoreflect.EnumNumber(x)
   173  }
   174  
   175  // Deprecated: Use NullValue.Descriptor instead.
   176  func (NullValue) EnumDescriptor() ([]byte, []int) {
   177  	return file_google_protobuf_struct_proto_rawDescGZIP(), []int{0}
   178  }
   179  
   180  // `Struct` represents a structured data value, consisting of fields
   181  // which map to dynamically typed values. In some languages, `Struct`
   182  // might be supported by a native representation. For example, in
   183  // scripting languages like JS a struct is represented as an
   184  // object. The details of that representation are described together
   185  // with the proto support for the language.
   186  //
   187  // The JSON representation for `Struct` is JSON object.
   188  type Struct struct {
   189  	state         protoimpl.MessageState
   190  	sizeCache     protoimpl.SizeCache
   191  	unknownFields protoimpl.UnknownFields
   192  
   193  	// Unordered map of dynamically typed values.
   194  	Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
   195  }
   196  
   197  // NewStruct constructs a Struct from a general-purpose Go map.
   198  // The map keys must be valid UTF-8.
   199  // The map values are converted using NewValue.
   200  func NewStruct(v map[string]interface{}) (*Struct, error) {
   201  	x := &Struct{Fields: make(map[string]*Value, len(v))}
   202  	for k, v := range v {
   203  		if !utf8.ValidString(k) {
   204  			return nil, protoimpl.X.NewError("invalid UTF-8 in string: %q", k)
   205  		}
   206  		var err error
   207  		x.Fields[k], err = NewValue(v)
   208  		if err != nil {
   209  			return nil, err
   210  		}
   211  	}
   212  	return x, nil
   213  }
   214  
   215  // AsMap converts x to a general-purpose Go map.
   216  // The map values are converted by calling Value.AsInterface.
   217  func (x *Struct) AsMap() map[string]interface{} {
   218  	f := x.GetFields()
   219  	vs := make(map[string]interface{}, len(f))
   220  	for k, v := range f {
   221  		vs[k] = v.AsInterface()
   222  	}
   223  	return vs
   224  }
   225  
   226  func (x *Struct) MarshalJSON() ([]byte, error) {
   227  	return protojson.Marshal(x)
   228  }
   229  
   230  func (x *Struct) UnmarshalJSON(b []byte) error {
   231  	return protojson.Unmarshal(b, x)
   232  }
   233  
   234  func (x *Struct) Reset() {
   235  	*x = Struct{}
   236  	if protoimpl.UnsafeEnabled {
   237  		mi := &file_google_protobuf_struct_proto_msgTypes[0]
   238  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   239  		ms.StoreMessageInfo(mi)
   240  	}
   241  }
   242  
   243  func (x *Struct) String() string {
   244  	return protoimpl.X.MessageStringOf(x)
   245  }
   246  
   247  func (*Struct) ProtoMessage() {}
   248  
   249  func (x *Struct) ProtoReflect() protoreflect.Message {
   250  	mi := &file_google_protobuf_struct_proto_msgTypes[0]
   251  	if protoimpl.UnsafeEnabled && x != nil {
   252  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   253  		if ms.LoadMessageInfo() == nil {
   254  			ms.StoreMessageInfo(mi)
   255  		}
   256  		return ms
   257  	}
   258  	return mi.MessageOf(x)
   259  }
   260  
   261  // Deprecated: Use Struct.ProtoReflect.Descriptor instead.
   262  func (*Struct) Descriptor() ([]byte, []int) {
   263  	return file_google_protobuf_struct_proto_rawDescGZIP(), []int{0}
   264  }
   265  
   266  func (x *Struct) GetFields() map[string]*Value {
   267  	if x != nil {
   268  		return x.Fields
   269  	}
   270  	return nil
   271  }
   272  
   273  // `Value` represents a dynamically typed value which can be either
   274  // null, a number, a string, a boolean, a recursive struct value, or a
   275  // list of values. A producer of value is expected to set one of these
   276  // variants. Absence of any variant indicates an error.
   277  //
   278  // The JSON representation for `Value` is JSON value.
   279  type Value struct {
   280  	state         protoimpl.MessageState
   281  	sizeCache     protoimpl.SizeCache
   282  	unknownFields protoimpl.UnknownFields
   283  
   284  	// The kind of value.
   285  	//
   286  	// Types that are assignable to Kind:
   287  	//	*Value_NullValue
   288  	//	*Value_NumberValue
   289  	//	*Value_StringValue
   290  	//	*Value_BoolValue
   291  	//	*Value_StructValue
   292  	//	*Value_ListValue
   293  	Kind isValue_Kind `protobuf_oneof:"kind"`
   294  }
   295  
   296  // NewValue constructs a Value from a general-purpose Go interface.
   297  //
   298  //	╔════════════════════════╤════════════════════════════════════════════╗
   299  //	║ Go type                │ Conversion                                 ║
   300  //	╠════════════════════════╪════════════════════════════════════════════╣
   301  //	║ nil                    │ stored as NullValue                        ║
   302  //	║ bool                   │ stored as BoolValue                        ║
   303  //	║ int, int32, int64      │ stored as NumberValue                      ║
   304  //	║ uint, uint32, uint64   │ stored as NumberValue                      ║
   305  //	║ float32, float64       │ stored as NumberValue                      ║
   306  //	║ string                 │ stored as StringValue; must be valid UTF-8 ║
   307  //	║ []byte                 │ stored as StringValue; base64-encoded      ║
   308  //	║ map[string]interface{} │ stored as StructValue                      ║
   309  //	║ []interface{}          │ stored as ListValue                        ║
   310  //	╚════════════════════════╧════════════════════════════════════════════╝
   311  //
   312  // When converting an int64 or uint64 to a NumberValue, numeric precision loss
   313  // is possible since they are stored as a float64.
   314  func NewValue(v interface{}) (*Value, error) {
   315  	switch v := v.(type) {
   316  	case nil:
   317  		return NewNullValue(), nil
   318  	case bool:
   319  		return NewBoolValue(v), nil
   320  	case int:
   321  		return NewNumberValue(float64(v)), nil
   322  	case int32:
   323  		return NewNumberValue(float64(v)), nil
   324  	case int64:
   325  		return NewNumberValue(float64(v)), nil
   326  	case uint:
   327  		return NewNumberValue(float64(v)), nil
   328  	case uint32:
   329  		return NewNumberValue(float64(v)), nil
   330  	case uint64:
   331  		return NewNumberValue(float64(v)), nil
   332  	case float32:
   333  		return NewNumberValue(float64(v)), nil
   334  	case float64:
   335  		return NewNumberValue(float64(v)), nil
   336  	case string:
   337  		if !utf8.ValidString(v) {
   338  			return nil, protoimpl.X.NewError("invalid UTF-8 in string: %q", v)
   339  		}
   340  		return NewStringValue(v), nil
   341  	case []byte:
   342  		s := base64.StdEncoding.EncodeToString(v)
   343  		return NewStringValue(s), nil
   344  	case map[string]interface{}:
   345  		v2, err := NewStruct(v)
   346  		if err != nil {
   347  			return nil, err
   348  		}
   349  		return NewStructValue(v2), nil
   350  	case []interface{}:
   351  		v2, err := NewList(v)
   352  		if err != nil {
   353  			return nil, err
   354  		}
   355  		return NewListValue(v2), nil
   356  	default:
   357  		return nil, protoimpl.X.NewError("invalid type: %T", v)
   358  	}
   359  }
   360  
   361  // NewNullValue constructs a new null Value.
   362  func NewNullValue() *Value {
   363  	return &Value{Kind: &Value_NullValue{NullValue: NullValue_NULL_VALUE}}
   364  }
   365  
   366  // NewBoolValue constructs a new boolean Value.
   367  func NewBoolValue(v bool) *Value {
   368  	return &Value{Kind: &Value_BoolValue{BoolValue: v}}
   369  }
   370  
   371  // NewNumberValue constructs a new number Value.
   372  func NewNumberValue(v float64) *Value {
   373  	return &Value{Kind: &Value_NumberValue{NumberValue: v}}
   374  }
   375  
   376  // NewStringValue constructs a new string Value.
   377  func NewStringValue(v string) *Value {
   378  	return &Value{Kind: &Value_StringValue{StringValue: v}}
   379  }
   380  
   381  // NewStructValue constructs a new struct Value.
   382  func NewStructValue(v *Struct) *Value {
   383  	return &Value{Kind: &Value_StructValue{StructValue: v}}
   384  }
   385  
   386  // NewListValue constructs a new list Value.
   387  func NewListValue(v *ListValue) *Value {
   388  	return &Value{Kind: &Value_ListValue{ListValue: v}}
   389  }
   390  
   391  // AsInterface converts x to a general-purpose Go interface.
   392  //
   393  // Calling Value.MarshalJSON and "encoding/json".Marshal on this output produce
   394  // semantically equivalent JSON (assuming no errors occur).
   395  //
   396  // Floating-point values (i.e., "NaN", "Infinity", and "-Infinity") are
   397  // converted as strings to remain compatible with MarshalJSON.
   398  func (x *Value) AsInterface() interface{} {
   399  	switch v := x.GetKind().(type) {
   400  	case *Value_NumberValue:
   401  		if v != nil {
   402  			switch {
   403  			case math.IsNaN(v.NumberValue):
   404  				return "NaN"
   405  			case math.IsInf(v.NumberValue, +1):
   406  				return "Infinity"
   407  			case math.IsInf(v.NumberValue, -1):
   408  				return "-Infinity"
   409  			default:
   410  				return v.NumberValue
   411  			}
   412  		}
   413  	case *Value_StringValue:
   414  		if v != nil {
   415  			return v.StringValue
   416  		}
   417  	case *Value_BoolValue:
   418  		if v != nil {
   419  			return v.BoolValue
   420  		}
   421  	case *Value_StructValue:
   422  		if v != nil {
   423  			return v.StructValue.AsMap()
   424  		}
   425  	case *Value_ListValue:
   426  		if v != nil {
   427  			return v.ListValue.AsSlice()
   428  		}
   429  	}
   430  	return nil
   431  }
   432  
   433  func (x *Value) MarshalJSON() ([]byte, error) {
   434  	return protojson.Marshal(x)
   435  }
   436  
   437  func (x *Value) UnmarshalJSON(b []byte) error {
   438  	return protojson.Unmarshal(b, x)
   439  }
   440  
   441  func (x *Value) Reset() {
   442  	*x = Value{}
   443  	if protoimpl.UnsafeEnabled {
   444  		mi := &file_google_protobuf_struct_proto_msgTypes[1]
   445  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   446  		ms.StoreMessageInfo(mi)
   447  	}
   448  }
   449  
   450  func (x *Value) String() string {
   451  	return protoimpl.X.MessageStringOf(x)
   452  }
   453  
   454  func (*Value) ProtoMessage() {}
   455  
   456  func (x *Value) ProtoReflect() protoreflect.Message {
   457  	mi := &file_google_protobuf_struct_proto_msgTypes[1]
   458  	if protoimpl.UnsafeEnabled && x != nil {
   459  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   460  		if ms.LoadMessageInfo() == nil {
   461  			ms.StoreMessageInfo(mi)
   462  		}
   463  		return ms
   464  	}
   465  	return mi.MessageOf(x)
   466  }
   467  
   468  // Deprecated: Use Value.ProtoReflect.Descriptor instead.
   469  func (*Value) Descriptor() ([]byte, []int) {
   470  	return file_google_protobuf_struct_proto_rawDescGZIP(), []int{1}
   471  }
   472  
   473  func (m *Value) GetKind() isValue_Kind {
   474  	if m != nil {
   475  		return m.Kind
   476  	}
   477  	return nil
   478  }
   479  
   480  func (x *Value) GetNullValue() NullValue {
   481  	if x, ok := x.GetKind().(*Value_NullValue); ok {
   482  		return x.NullValue
   483  	}
   484  	return NullValue_NULL_VALUE
   485  }
   486  
   487  func (x *Value) GetNumberValue() float64 {
   488  	if x, ok := x.GetKind().(*Value_NumberValue); ok {
   489  		return x.NumberValue
   490  	}
   491  	return 0
   492  }
   493  
   494  func (x *Value) GetStringValue() string {
   495  	if x, ok := x.GetKind().(*Value_StringValue); ok {
   496  		return x.StringValue
   497  	}
   498  	return ""
   499  }
   500  
   501  func (x *Value) GetBoolValue() bool {
   502  	if x, ok := x.GetKind().(*Value_BoolValue); ok {
   503  		return x.BoolValue
   504  	}
   505  	return false
   506  }
   507  
   508  func (x *Value) GetStructValue() *Struct {
   509  	if x, ok := x.GetKind().(*Value_StructValue); ok {
   510  		return x.StructValue
   511  	}
   512  	return nil
   513  }
   514  
   515  func (x *Value) GetListValue() *ListValue {
   516  	if x, ok := x.GetKind().(*Value_ListValue); ok {
   517  		return x.ListValue
   518  	}
   519  	return nil
   520  }
   521  
   522  type isValue_Kind interface {
   523  	isValue_Kind()
   524  }
   525  
   526  type Value_NullValue struct {
   527  	// Represents a null value.
   528  	NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
   529  }
   530  
   531  type Value_NumberValue struct {
   532  	// Represents a double value.
   533  	NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"`
   534  }
   535  
   536  type Value_StringValue struct {
   537  	// Represents a string value.
   538  	StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"`
   539  }
   540  
   541  type Value_BoolValue struct {
   542  	// Represents a boolean value.
   543  	BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
   544  }
   545  
   546  type Value_StructValue struct {
   547  	// Represents a structured value.
   548  	StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"`
   549  }
   550  
   551  type Value_ListValue struct {
   552  	// Represents a repeated `Value`.
   553  	ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"`
   554  }
   555  
   556  func (*Value_NullValue) isValue_Kind() {}
   557  
   558  func (*Value_NumberValue) isValue_Kind() {}
   559  
   560  func (*Value_StringValue) isValue_Kind() {}
   561  
   562  func (*Value_BoolValue) isValue_Kind() {}
   563  
   564  func (*Value_StructValue) isValue_Kind() {}
   565  
   566  func (*Value_ListValue) isValue_Kind() {}
   567  
   568  // `ListValue` is a wrapper around a repeated field of values.
   569  //
   570  // The JSON representation for `ListValue` is JSON array.
   571  type ListValue struct {
   572  	state         protoimpl.MessageState
   573  	sizeCache     protoimpl.SizeCache
   574  	unknownFields protoimpl.UnknownFields
   575  
   576  	// Repeated field of dynamically typed values.
   577  	Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
   578  }
   579  
   580  // NewList constructs a ListValue from a general-purpose Go slice.
   581  // The slice elements are converted using NewValue.
   582  func NewList(v []interface{}) (*ListValue, error) {
   583  	x := &ListValue{Values: make([]*Value, len(v))}
   584  	for i, v := range v {
   585  		var err error
   586  		x.Values[i], err = NewValue(v)
   587  		if err != nil {
   588  			return nil, err
   589  		}
   590  	}
   591  	return x, nil
   592  }
   593  
   594  // AsSlice converts x to a general-purpose Go slice.
   595  // The slice elements are converted by calling Value.AsInterface.
   596  func (x *ListValue) AsSlice() []interface{} {
   597  	vals := x.GetValues()
   598  	vs := make([]interface{}, len(vals))
   599  	for i, v := range vals {
   600  		vs[i] = v.AsInterface()
   601  	}
   602  	return vs
   603  }
   604  
   605  func (x *ListValue) MarshalJSON() ([]byte, error) {
   606  	return protojson.Marshal(x)
   607  }
   608  
   609  func (x *ListValue) UnmarshalJSON(b []byte) error {
   610  	return protojson.Unmarshal(b, x)
   611  }
   612  
   613  func (x *ListValue) Reset() {
   614  	*x = ListValue{}
   615  	if protoimpl.UnsafeEnabled {
   616  		mi := &file_google_protobuf_struct_proto_msgTypes[2]
   617  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   618  		ms.StoreMessageInfo(mi)
   619  	}
   620  }
   621  
   622  func (x *ListValue) String() string {
   623  	return protoimpl.X.MessageStringOf(x)
   624  }
   625  
   626  func (*ListValue) ProtoMessage() {}
   627  
   628  func (x *ListValue) ProtoReflect() protoreflect.Message {
   629  	mi := &file_google_protobuf_struct_proto_msgTypes[2]
   630  	if protoimpl.UnsafeEnabled && x != nil {
   631  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   632  		if ms.LoadMessageInfo() == nil {
   633  			ms.StoreMessageInfo(mi)
   634  		}
   635  		return ms
   636  	}
   637  	return mi.MessageOf(x)
   638  }
   639  
   640  // Deprecated: Use ListValue.ProtoReflect.Descriptor instead.
   641  func (*ListValue) Descriptor() ([]byte, []int) {
   642  	return file_google_protobuf_struct_proto_rawDescGZIP(), []int{2}
   643  }
   644  
   645  func (x *ListValue) GetValues() []*Value {
   646  	if x != nil {
   647  		return x.Values
   648  	}
   649  	return nil
   650  }
   651  
   652  var File_google_protobuf_struct_proto protoreflect.FileDescriptor
   653  
   654  var file_google_protobuf_struct_proto_rawDesc = []byte{
   655  	0x0a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
   656  	0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
   657  	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22,
   658  	0x98, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x66, 0x69,
   659  	0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f,
   660  	0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
   661  	0x75, 0x63, 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
   662  	0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x51, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64,
   663  	0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
   664  	0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
   665  	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
   666  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
   667  	0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb2, 0x02, 0x0a, 0x05, 0x56,
   668  	0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c,
   669  	0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
   670  	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56,
   671  	0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75,
   672  	0x65, 0x12, 0x23, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75,
   673  	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x62, 0x65,
   674  	0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
   675  	0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b,
   676  	0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62,
   677  	0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48,
   678  	0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0c,
   679  	0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01,
   680  	0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
   681  	0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73,
   682  	0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x6c, 0x69,
   683  	0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
   684  	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
   685  	0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69,
   686  	0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22,
   687  	0x3b, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x06,
   688  	0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67,
   689  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56,
   690  	0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2a, 0x1b, 0x0a, 0x09,
   691  	0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x55, 0x4c,
   692  	0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x42, 0x7f, 0x0a, 0x13, 0x63, 0x6f, 0x6d,
   693  	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
   694  	0x42, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
   695  	0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f,
   696  	0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65,
   697  	0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x70, 0x62,
   698  	0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67,
   699  	0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c,
   700  	0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
   701  	0x6f, 0x33,
   702  }
   703  
   704  var (
   705  	file_google_protobuf_struct_proto_rawDescOnce sync.Once
   706  	file_google_protobuf_struct_proto_rawDescData = file_google_protobuf_struct_proto_rawDesc
   707  )
   708  
   709  func file_google_protobuf_struct_proto_rawDescGZIP() []byte {
   710  	file_google_protobuf_struct_proto_rawDescOnce.Do(func() {
   711  		file_google_protobuf_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_struct_proto_rawDescData)
   712  	})
   713  	return file_google_protobuf_struct_proto_rawDescData
   714  }
   715  
   716  var file_google_protobuf_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   717  var file_google_protobuf_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
   718  var file_google_protobuf_struct_proto_goTypes = []interface{}{
   719  	(NullValue)(0),    // 0: google.protobuf.NullValue
   720  	(*Struct)(nil),    // 1: google.protobuf.Struct
   721  	(*Value)(nil),     // 2: google.protobuf.Value
   722  	(*ListValue)(nil), // 3: google.protobuf.ListValue
   723  	nil,               // 4: google.protobuf.Struct.FieldsEntry
   724  }
   725  var file_google_protobuf_struct_proto_depIdxs = []int32{
   726  	4, // 0: google.protobuf.Struct.fields:type_name -> google.protobuf.Struct.FieldsEntry
   727  	0, // 1: google.protobuf.Value.null_value:type_name -> google.protobuf.NullValue
   728  	1, // 2: google.protobuf.Value.struct_value:type_name -> google.protobuf.Struct
   729  	3, // 3: google.protobuf.Value.list_value:type_name -> google.protobuf.ListValue
   730  	2, // 4: google.protobuf.ListValue.values:type_name -> google.protobuf.Value
   731  	2, // 5: google.protobuf.Struct.FieldsEntry.value:type_name -> google.protobuf.Value
   732  	6, // [6:6] is the sub-list for method output_type
   733  	6, // [6:6] is the sub-list for method input_type
   734  	6, // [6:6] is the sub-list for extension type_name
   735  	6, // [6:6] is the sub-list for extension extendee
   736  	0, // [0:6] is the sub-list for field type_name
   737  }
   738  
   739  func init() { file_google_protobuf_struct_proto_init() }
   740  func file_google_protobuf_struct_proto_init() {
   741  	if File_google_protobuf_struct_proto != nil {
   742  		return
   743  	}
   744  	if !protoimpl.UnsafeEnabled {
   745  		file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   746  			switch v := v.(*Struct); i {
   747  			case 0:
   748  				return &v.state
   749  			case 1:
   750  				return &v.sizeCache
   751  			case 2:
   752  				return &v.unknownFields
   753  			default:
   754  				return nil
   755  			}
   756  		}
   757  		file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   758  			switch v := v.(*Value); i {
   759  			case 0:
   760  				return &v.state
   761  			case 1:
   762  				return &v.sizeCache
   763  			case 2:
   764  				return &v.unknownFields
   765  			default:
   766  				return nil
   767  			}
   768  		}
   769  		file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   770  			switch v := v.(*ListValue); i {
   771  			case 0:
   772  				return &v.state
   773  			case 1:
   774  				return &v.sizeCache
   775  			case 2:
   776  				return &v.unknownFields
   777  			default:
   778  				return nil
   779  			}
   780  		}
   781  	}
   782  	file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []interface{}{
   783  		(*Value_NullValue)(nil),
   784  		(*Value_NumberValue)(nil),
   785  		(*Value_StringValue)(nil),
   786  		(*Value_BoolValue)(nil),
   787  		(*Value_StructValue)(nil),
   788  		(*Value_ListValue)(nil),
   789  	}
   790  	type x struct{}
   791  	out := protoimpl.TypeBuilder{
   792  		File: protoimpl.DescBuilder{
   793  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   794  			RawDescriptor: file_google_protobuf_struct_proto_rawDesc,
   795  			NumEnums:      1,
   796  			NumMessages:   4,
   797  			NumExtensions: 0,
   798  			NumServices:   0,
   799  		},
   800  		GoTypes:           file_google_protobuf_struct_proto_goTypes,
   801  		DependencyIndexes: file_google_protobuf_struct_proto_depIdxs,
   802  		EnumInfos:         file_google_protobuf_struct_proto_enumTypes,
   803  		MessageInfos:      file_google_protobuf_struct_proto_msgTypes,
   804  	}.Build()
   805  	File_google_protobuf_struct_proto = out.File
   806  	file_google_protobuf_struct_proto_rawDesc = nil
   807  	file_google_protobuf_struct_proto_goTypes = nil
   808  	file_google_protobuf_struct_proto_depIdxs = nil
   809  }