blob: 4fa309b31d095a3303710045f9821f938826a449 [file] [log] [blame]
Joe Tsai19058432019-02-27 21:46:29 -08001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/protobuf/any.proto
3
4package known_proto
5
6import (
Joe Tsai19058432019-02-27 21:46:29 -08007 protoreflect "github.com/golang/protobuf/v2/reflect/protoreflect"
Joe Tsai35ec98f2019-03-25 14:41:32 -07008 protoregistry "github.com/golang/protobuf/v2/reflect/protoregistry"
Joe Tsai19058432019-02-27 21:46:29 -08009 protoimpl "github.com/golang/protobuf/v2/runtime/protoimpl"
Joe Tsai5d72cc22019-03-28 01:13:26 -070010 sync "sync"
Joe Tsai19058432019-02-27 21:46:29 -080011)
12
Joe Tsai5d72cc22019-03-28 01:13:26 -070013const _ = protoimpl.EnforceVersion(protoimpl.Version - 0)
14
Joe Tsai19058432019-02-27 21:46:29 -080015// `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//
95type Any struct {
96 // A URL/resource name that uniquely identifies the type of the serialized
Joe Tsaibb786ea2019-03-11 22:53:48 -070097 // protocol buffer message. This string must contain at least
98 // one "/" character. The last segment of the URL's path must represent
Joe Tsai19058432019-02-27 21:46:29 -080099 // 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 Tsai61968ce2019-04-01 12:59:24 -0700132func (x *Any) Reset() {
133 *x = Any{}
Joe Tsai19058432019-02-27 21:46:29 -0800134}
Joe Tsai61968ce2019-04-01 12:59:24 -0700135
136func (x *Any) String() string {
137 return protoimpl.X.MessageStringOf(x)
138}
139
140func (*Any) ProtoMessage() {}
141
142func (x *Any) ProtoReflect() protoreflect.Message {
143 return xxx_File_google_protobuf_any_proto_messageTypes[0].MessageOf(x)
144}
Joe Tsai8e506a82019-03-16 00:05:34 -0700145
146// Deprecated: Use Any.ProtoReflect.Type instead.
Joe Tsai19058432019-02-27 21:46:29 -0800147func (*Any) Descriptor() ([]byte, []int) {
Joe Tsai5d72cc22019-03-28 01:13:26 -0700148 return xxx_File_google_protobuf_any_proto_rawDescGZIP(), []int{0}
Joe Tsai19058432019-02-27 21:46:29 -0800149}
150
151func (*Any) XXX_WellKnownType() string { return "Any" }
152
Joe Tsai61968ce2019-04-01 12:59:24 -0700153func (x *Any) GetTypeUrl() string {
154 if x != nil {
155 return x.TypeUrl
Joe Tsai19058432019-02-27 21:46:29 -0800156 }
157 return ""
158}
159
Joe Tsai61968ce2019-04-01 12:59:24 -0700160func (x *Any) GetValue() []byte {
161 if x != nil {
162 return x.Value
Joe Tsai19058432019-02-27 21:46:29 -0800163 }
164 return nil
165}
166
Joe Tsai5d72cc22019-03-28 01:13:26 -0700167var File_google_protobuf_any_proto protoreflect.FileDescriptor
168
169var xxx_File_google_protobuf_any_proto_rawDesc = []byte{
Joe Tsai19058432019-02-27 21:46:29 -0800170 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 Tsai5d72cc22019-03-28 01:13:26 -0700187var (
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 Tsai19058432019-02-27 21:46:29 -0800191
Joe Tsai5d72cc22019-03-28 01:13:26 -0700192func 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 Tsai19058432019-02-27 21:46:29 -0800198
Damien Neil6bb8dec2019-03-01 13:22:30 -0800199var xxx_File_google_protobuf_any_proto_messageTypes = make([]protoimpl.MessageType, 1)
Joe Tsai19058432019-02-27 21:46:29 -0800200var xxx_File_google_protobuf_any_proto_goTypes = []interface{}{
201 (*Any)(nil), // 0: google.protobuf.Any
202}
203var xxx_File_google_protobuf_any_proto_depIdxs = []int32{}
204
Damien Neil0fc22452019-03-08 17:18:11 -0800205func init() { xxx_File_google_protobuf_any_proto_init() }
206func xxx_File_google_protobuf_any_proto_init() {
207 if File_google_protobuf_any_proto != nil {
208 return
209 }
Joe Tsai19058432019-02-27 21:46:29 -0800210 File_google_protobuf_any_proto = protoimpl.FileBuilder{
Joe Tsai5d72cc22019-03-28 01:13:26 -0700211 RawDescriptor: xxx_File_google_protobuf_any_proto_rawDesc,
Joe Tsai19058432019-02-27 21:46:29 -0800212 GoTypes: xxx_File_google_protobuf_any_proto_goTypes,
213 DependencyIndexes: xxx_File_google_protobuf_any_proto_depIdxs,
Joe Tsai35ec98f2019-03-25 14:41:32 -0700214 MessageOutputTypes: xxx_File_google_protobuf_any_proto_messageTypes,
215 FilesRegistry: protoregistry.GlobalFiles,
216 TypesRegistry: protoregistry.GlobalTypes,
Joe Tsai19058432019-02-27 21:46:29 -0800217 }.Init()
Joe Tsai5d72cc22019-03-28 01:13:26 -0700218 xxx_File_google_protobuf_any_proto_rawDesc = nil
Joe Tsai19058432019-02-27 21:46:29 -0800219 xxx_File_google_protobuf_any_proto_goTypes = nil
220 xxx_File_google_protobuf_any_proto_depIdxs = nil
221}