Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: google/protobuf/any.proto |
| 3 | |
| 4 | package known_proto |
| 5 | |
| 6 | import ( |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 7 | protoreflect "github.com/golang/protobuf/v2/reflect/protoreflect" |
Joe Tsai | 35ec98f | 2019-03-25 14:41:32 -0700 | [diff] [blame] | 8 | protoregistry "github.com/golang/protobuf/v2/reflect/protoregistry" |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 9 | protoimpl "github.com/golang/protobuf/v2/runtime/protoimpl" |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 10 | sync "sync" |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 11 | ) |
| 12 | |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 13 | const _ = protoimpl.EnforceVersion(protoimpl.Version - 0) |
| 14 | |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 15 | // `Any` contains an arbitrary serialized protocol buffer message along with a |
| 16 | // URL that describes the type of the serialized message. |
| 17 | // |
| 18 | // Protobuf library provides support to pack/unpack Any values in the form |
| 19 | // of utility functions or additional generated methods of the Any type. |
| 20 | // |
| 21 | // Example 1: Pack and unpack a message in C++. |
| 22 | // |
| 23 | // Foo foo = ...; |
| 24 | // Any any; |
| 25 | // any.PackFrom(foo); |
| 26 | // ... |
| 27 | // if (any.UnpackTo(&foo)) { |
| 28 | // ... |
| 29 | // } |
| 30 | // |
| 31 | // Example 2: Pack and unpack a message in Java. |
| 32 | // |
| 33 | // Foo foo = ...; |
| 34 | // Any any = Any.pack(foo); |
| 35 | // ... |
| 36 | // if (any.is(Foo.class)) { |
| 37 | // foo = any.unpack(Foo.class); |
| 38 | // } |
| 39 | // |
| 40 | // Example 3: Pack and unpack a message in Python. |
| 41 | // |
| 42 | // foo = Foo(...) |
| 43 | // any = Any() |
| 44 | // any.Pack(foo) |
| 45 | // ... |
| 46 | // if any.Is(Foo.DESCRIPTOR): |
| 47 | // any.Unpack(foo) |
| 48 | // ... |
| 49 | // |
| 50 | // Example 4: Pack and unpack a message in Go |
| 51 | // |
| 52 | // foo := &pb.Foo{...} |
| 53 | // any, err := ptypes.MarshalAny(foo) |
| 54 | // ... |
| 55 | // foo := &pb.Foo{} |
| 56 | // if err := ptypes.UnmarshalAny(any, foo); err != nil { |
| 57 | // ... |
| 58 | // } |
| 59 | // |
| 60 | // The pack methods provided by protobuf library will by default use |
| 61 | // 'type.googleapis.com/full.type.name' as the type URL and the unpack |
| 62 | // methods only use the fully qualified type name after the last '/' |
| 63 | // in the type URL, for example "foo.bar.com/x/y.z" will yield type |
| 64 | // name "y.z". |
| 65 | // |
| 66 | // |
| 67 | // JSON |
| 68 | // ==== |
| 69 | // The JSON representation of an `Any` value uses the regular |
| 70 | // representation of the deserialized, embedded message, with an |
| 71 | // additional field `@type` which contains the type URL. Example: |
| 72 | // |
| 73 | // package google.profile; |
| 74 | // message Person { |
| 75 | // string first_name = 1; |
| 76 | // string last_name = 2; |
| 77 | // } |
| 78 | // |
| 79 | // { |
| 80 | // "@type": "type.googleapis.com/google.profile.Person", |
| 81 | // "firstName": <string>, |
| 82 | // "lastName": <string> |
| 83 | // } |
| 84 | // |
| 85 | // If the embedded message type is well-known and has a custom JSON |
| 86 | // representation, that representation will be embedded adding a field |
| 87 | // `value` which holds the custom JSON in addition to the `@type` |
| 88 | // field. Example (for message [google.protobuf.Duration][]): |
| 89 | // |
| 90 | // { |
| 91 | // "@type": "type.googleapis.com/google.protobuf.Duration", |
| 92 | // "value": "1.212s" |
| 93 | // } |
| 94 | // |
| 95 | type Any struct { |
| 96 | // A URL/resource name that uniquely identifies the type of the serialized |
Joe Tsai | bb786ea | 2019-03-11 22:53:48 -0700 | [diff] [blame] | 97 | // protocol buffer message. This string must contain at least |
| 98 | // one "/" character. The last segment of the URL's path must represent |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 99 | // the fully qualified name of the type (as in |
| 100 | // `path/google.protobuf.Duration`). The name should be in a canonical form |
| 101 | // (e.g., leading "." is not accepted). |
| 102 | // |
| 103 | // In practice, teams usually precompile into the binary all types that they |
| 104 | // expect it to use in the context of Any. However, for URLs which use the |
| 105 | // scheme `http`, `https`, or no scheme, one can optionally set up a type |
| 106 | // server that maps type URLs to message definitions as follows: |
| 107 | // |
| 108 | // * If no scheme is provided, `https` is assumed. |
| 109 | // * An HTTP GET on the URL must yield a [google.protobuf.Type][] |
| 110 | // value in binary format, or produce an error. |
| 111 | // * Applications are allowed to cache lookup results based on the |
| 112 | // URL, or have them precompiled into a binary to avoid any |
| 113 | // lookup. Therefore, binary compatibility needs to be preserved |
| 114 | // on changes to types. (Use versioned type names to manage |
| 115 | // breaking changes.) |
| 116 | // |
| 117 | // Note: this functionality is not currently available in the official |
| 118 | // protobuf release, and it is not used for type URLs beginning with |
| 119 | // type.googleapis.com. |
| 120 | // |
| 121 | // Schemes other than `http`, `https` (or the empty scheme) might be |
| 122 | // used with implementation specific semantics. |
| 123 | // |
| 124 | TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` |
| 125 | // Must be a valid serialized protocol buffer of the above specified type. |
| 126 | Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` |
| 127 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 128 | XXX_unrecognized []byte `json:"-"` |
| 129 | XXX_sizecache int32 `json:"-"` |
| 130 | } |
| 131 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame^] | 132 | func (x *Any) Reset() { |
| 133 | *x = Any{} |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 134 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame^] | 135 | |
| 136 | func (x *Any) String() string { |
| 137 | return protoimpl.X.MessageStringOf(x) |
| 138 | } |
| 139 | |
| 140 | func (*Any) ProtoMessage() {} |
| 141 | |
| 142 | func (x *Any) ProtoReflect() protoreflect.Message { |
| 143 | return xxx_File_google_protobuf_any_proto_messageTypes[0].MessageOf(x) |
| 144 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 145 | |
| 146 | // Deprecated: Use Any.ProtoReflect.Type instead. |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 147 | func (*Any) Descriptor() ([]byte, []int) { |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 148 | return xxx_File_google_protobuf_any_proto_rawDescGZIP(), []int{0} |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | func (*Any) XXX_WellKnownType() string { return "Any" } |
| 152 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame^] | 153 | func (x *Any) GetTypeUrl() string { |
| 154 | if x != nil { |
| 155 | return x.TypeUrl |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 156 | } |
| 157 | return "" |
| 158 | } |
| 159 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame^] | 160 | func (x *Any) GetValue() []byte { |
| 161 | if x != nil { |
| 162 | return x.Value |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 163 | } |
| 164 | return nil |
| 165 | } |
| 166 | |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 167 | var File_google_protobuf_any_proto protoreflect.FileDescriptor |
| 168 | |
| 169 | var xxx_File_google_protobuf_any_proto_rawDesc = []byte{ |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 170 | 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, |
| 171 | 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, |
| 172 | 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x36, 0x0a, 0x03, |
| 173 | 0x41, 0x6e, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, |
| 174 | 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x14, |
| 175 | 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, |
| 176 | 0x61, 0x6c, 0x75, 0x65, 0x42, 0x7f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, |
| 177 | 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x08, 0x41, 0x6e, 0x79, |
| 178 | 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, |
| 179 | 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 180 | 0x62, 0x75, 0x66, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, |
| 181 | 0x77, 0x6e, 0x3b, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, |
| 182 | 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, |
| 183 | 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, |
| 184 | 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 185 | } |
| 186 | |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 187 | var ( |
| 188 | xxx_File_google_protobuf_any_proto_rawDesc_once sync.Once |
| 189 | xxx_File_google_protobuf_any_proto_rawDesc_data = xxx_File_google_protobuf_any_proto_rawDesc |
| 190 | ) |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 191 | |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 192 | func xxx_File_google_protobuf_any_proto_rawDescGZIP() []byte { |
| 193 | xxx_File_google_protobuf_any_proto_rawDesc_once.Do(func() { |
| 194 | xxx_File_google_protobuf_any_proto_rawDesc_data = protoimpl.X.CompressGZIP(xxx_File_google_protobuf_any_proto_rawDesc_data) |
| 195 | }) |
| 196 | return xxx_File_google_protobuf_any_proto_rawDesc_data |
| 197 | } |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 198 | |
Damien Neil | 6bb8dec | 2019-03-01 13:22:30 -0800 | [diff] [blame] | 199 | var xxx_File_google_protobuf_any_proto_messageTypes = make([]protoimpl.MessageType, 1) |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 200 | var xxx_File_google_protobuf_any_proto_goTypes = []interface{}{ |
| 201 | (*Any)(nil), // 0: google.protobuf.Any |
| 202 | } |
| 203 | var xxx_File_google_protobuf_any_proto_depIdxs = []int32{} |
| 204 | |
Damien Neil | 0fc2245 | 2019-03-08 17:18:11 -0800 | [diff] [blame] | 205 | func init() { xxx_File_google_protobuf_any_proto_init() } |
| 206 | func xxx_File_google_protobuf_any_proto_init() { |
| 207 | if File_google_protobuf_any_proto != nil { |
| 208 | return |
| 209 | } |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 210 | File_google_protobuf_any_proto = protoimpl.FileBuilder{ |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 211 | RawDescriptor: xxx_File_google_protobuf_any_proto_rawDesc, |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 212 | GoTypes: xxx_File_google_protobuf_any_proto_goTypes, |
| 213 | DependencyIndexes: xxx_File_google_protobuf_any_proto_depIdxs, |
Joe Tsai | 35ec98f | 2019-03-25 14:41:32 -0700 | [diff] [blame] | 214 | MessageOutputTypes: xxx_File_google_protobuf_any_proto_messageTypes, |
| 215 | FilesRegistry: protoregistry.GlobalFiles, |
| 216 | TypesRegistry: protoregistry.GlobalTypes, |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 217 | }.Init() |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 218 | xxx_File_google_protobuf_any_proto_rawDesc = nil |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 219 | xxx_File_google_protobuf_any_proto_goTypes = nil |
| 220 | xxx_File_google_protobuf_any_proto_depIdxs = nil |
| 221 | } |