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