OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / golang / protobuf / ptypes / any / any.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/protobuf/any.proto
3
4 /*
5 Package any is a generated protocol buffer package.
6
7 It is generated from these files:
8         google/protobuf/any.proto
9
10 It has these top-level messages:
11         Any
12 */
13 package any
14
15 import proto "github.com/golang/protobuf/proto"
16 import fmt "fmt"
17 import math "math"
18
19 // Reference imports to suppress errors if they are not otherwise used.
20 var _ = proto.Marshal
21 var _ = fmt.Errorf
22 var _ = math.Inf
23
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the proto package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // proto package needs to be updated.
28 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
29
30 // `Any` contains an arbitrary serialized protocol buffer message along with a
31 // URL that describes the type of the serialized message.
32 //
33 // Protobuf library provides support to pack/unpack Any values in the form
34 // of utility functions or additional generated methods of the Any type.
35 //
36 // Example 1: Pack and unpack a message in C++.
37 //
38 //     Foo foo = ...;
39 //     Any any;
40 //     any.PackFrom(foo);
41 //     ...
42 //     if (any.UnpackTo(&foo)) {
43 //       ...
44 //     }
45 //
46 // Example 2: Pack and unpack a message in Java.
47 //
48 //     Foo foo = ...;
49 //     Any any = Any.pack(foo);
50 //     ...
51 //     if (any.is(Foo.class)) {
52 //       foo = any.unpack(Foo.class);
53 //     }
54 //
55 //  Example 3: Pack and unpack a message in Python.
56 //
57 //     foo = Foo(...)
58 //     any = Any()
59 //     any.Pack(foo)
60 //     ...
61 //     if any.Is(Foo.DESCRIPTOR):
62 //       any.Unpack(foo)
63 //       ...
64 //
65 //  Example 4: Pack and unpack a message in Go
66 //
67 //      foo := &pb.Foo{...}
68 //      any, err := ptypes.MarshalAny(foo)
69 //      ...
70 //      foo := &pb.Foo{}
71 //      if err := ptypes.UnmarshalAny(any, foo); err != nil {
72 //        ...
73 //      }
74 //
75 // The pack methods provided by protobuf library will by default use
76 // 'type.googleapis.com/full.type.name' as the type URL and the unpack
77 // methods only use the fully qualified type name after the last '/'
78 // in the type URL, for example "foo.bar.com/x/y.z" will yield type
79 // name "y.z".
80 //
81 //
82 // JSON
83 // ====
84 // The JSON representation of an `Any` value uses the regular
85 // representation of the deserialized, embedded message, with an
86 // additional field `@type` which contains the type URL. Example:
87 //
88 //     package google.profile;
89 //     message Person {
90 //       string first_name = 1;
91 //       string last_name = 2;
92 //     }
93 //
94 //     {
95 //       "@type": "type.googleapis.com/google.profile.Person",
96 //       "firstName": <string>,
97 //       "lastName": <string>
98 //     }
99 //
100 // If the embedded message type is well-known and has a custom JSON
101 // representation, that representation will be embedded adding a field
102 // `value` which holds the custom JSON in addition to the `@type`
103 // field. Example (for message [google.protobuf.Duration][]):
104 //
105 //     {
106 //       "@type": "type.googleapis.com/google.protobuf.Duration",
107 //       "value": "1.212s"
108 //     }
109 //
110 type Any struct {
111         // A URL/resource name whose content describes the type of the
112         // serialized protocol buffer message.
113         //
114         // For URLs which use the scheme `http`, `https`, or no scheme, the
115         // following restrictions and interpretations apply:
116         //
117         // * If no scheme is provided, `https` is assumed.
118         // * The last segment of the URL's path must represent the fully
119         //   qualified name of the type (as in `path/google.protobuf.Duration`).
120         //   The name should be in a canonical form (e.g., leading "." is
121         //   not accepted).
122         // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
123         //   value in binary format, or produce an error.
124         // * Applications are allowed to cache lookup results based on the
125         //   URL, or have them precompiled into a binary to avoid any
126         //   lookup. Therefore, binary compatibility needs to be preserved
127         //   on changes to types. (Use versioned type names to manage
128         //   breaking changes.)
129         //
130         // Schemes other than `http`, `https` (or the empty scheme) might be
131         // used with implementation specific semantics.
132         //
133         TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
134         // Must be a valid serialized protocol buffer of the above specified type.
135         Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
136 }
137
138 func (m *Any) Reset()                    { *m = Any{} }
139 func (m *Any) String() string            { return proto.CompactTextString(m) }
140 func (*Any) ProtoMessage()               {}
141 func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
142 func (*Any) XXX_WellKnownType() string   { return "Any" }
143
144 func (m *Any) GetTypeUrl() string {
145         if m != nil {
146                 return m.TypeUrl
147         }
148         return ""
149 }
150
151 func (m *Any) GetValue() []byte {
152         if m != nil {
153                 return m.Value
154         }
155         return nil
156 }
157
158 func init() {
159         proto.RegisterType((*Any)(nil), "google.protobuf.Any")
160 }
161
162 func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor0) }
163
164 var fileDescriptor0 = []byte{
165         // 185 bytes of a gzipped FileDescriptorProto
166         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f,
167         0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4,
168         0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a,
169         0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46,
170         0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7,
171         0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xca, 0xe7, 0x12, 0x4e, 0xce,
172         0xcf, 0xd5, 0x43, 0x33, 0xce, 0x89, 0xc3, 0x31, 0xaf, 0x32, 0x00, 0xc4, 0x09, 0x60, 0x8c, 0x52,
173         0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc,
174         0x4b, 0x47, 0xb8, 0xa8, 0x00, 0x64, 0x7a, 0x31, 0xc8, 0x61, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c,
175         0x56, 0x31, 0xc9, 0xb9, 0x43, 0x8c, 0x0a, 0x80, 0x2a, 0xd1, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce,
176         0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0x29, 0x4d, 0x62, 0x03, 0xeb, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff,
177         0xff, 0x13, 0xf8, 0xe8, 0x42, 0xdd, 0x00, 0x00, 0x00,
178 }