any.pb.go 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/protobuf/any.proto
  3. /*
  4. Package any is a generated protocol buffer package.
  5. It is generated from these files:
  6. google/protobuf/any.proto
  7. It has these top-level messages:
  8. Any
  9. */
  10. package any
  11. import proto "github.com/golang/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  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 whose content describes the type of the
  105. // serialized protocol buffer message.
  106. //
  107. // For URLs which use the scheme `http`, `https`, or no scheme, the
  108. // following restrictions and interpretations apply:
  109. //
  110. // * If no scheme is provided, `https` is assumed.
  111. // * The last segment of the URL's path must represent the fully
  112. // qualified name of the type (as in `path/google.protobuf.Duration`).
  113. // The name should be in a canonical form (e.g., leading "." is
  114. // not accepted).
  115. // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
  116. // value in binary format, or produce an error.
  117. // * Applications are allowed to cache lookup results based on the
  118. // URL, or have them precompiled into a binary to avoid any
  119. // lookup. Therefore, binary compatibility needs to be preserved
  120. // on changes to types. (Use versioned type names to manage
  121. // breaking changes.)
  122. //
  123. // Schemes other than `http`, `https` (or the empty scheme) might be
  124. // used with implementation specific semantics.
  125. //
  126. TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
  127. // Must be a valid serialized protocol buffer of the above specified type.
  128. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  129. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  130. XXX_unrecognized []byte `protobuf_unrecognized:"proto3" json:"-"`
  131. XXX_sizecache int32 `json:"-"`
  132. }
  133. func (m *Any) Reset() { *m = Any{} }
  134. func (m *Any) String() string { return proto.CompactTextString(m) }
  135. func (*Any) ProtoMessage() {}
  136. func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  137. func (*Any) XXX_WellKnownType() string { return "Any" }
  138. func (m *Any) Unmarshal(b []byte) error {
  139. return xxx_messageInfo_Any.Unmarshal(m, b)
  140. }
  141. func (m *Any) Marshal(b []byte, deterministic bool) ([]byte, error) {
  142. return xxx_messageInfo_Any.Marshal(b, m, deterministic)
  143. }
  144. func (dst *Any) XXX_Merge(src proto.Message) {
  145. xxx_messageInfo_Any.Merge(dst, src)
  146. }
  147. func (m *Any) XXX_Size() int {
  148. return xxx_messageInfo_Any.Size(m)
  149. }
  150. func (m *Any) XXX_DiscardUnknown() {
  151. xxx_messageInfo_Any.DiscardUnknown(m)
  152. }
  153. var xxx_messageInfo_Any proto.InternalMessageInfo
  154. func (m *Any) GetTypeUrl() string {
  155. if m != nil {
  156. return m.TypeUrl
  157. }
  158. return ""
  159. }
  160. func (m *Any) GetValue() []byte {
  161. if m != nil {
  162. return m.Value
  163. }
  164. return nil
  165. }
  166. func init() {
  167. proto.RegisterType((*Any)(nil), "google.protobuf.Any")
  168. }
  169. func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor0) }
  170. var fileDescriptor0 = []byte{
  171. // 185 bytes of a gzipped FileDescriptorProto
  172. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f,
  173. 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4,
  174. 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a,
  175. 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46,
  176. 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7,
  177. 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xca, 0xe7, 0x12, 0x4e, 0xce,
  178. 0xcf, 0xd5, 0x43, 0x33, 0xce, 0x89, 0xc3, 0x31, 0xaf, 0x32, 0x00, 0xc4, 0x09, 0x60, 0x8c, 0x52,
  179. 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc,
  180. 0x4b, 0x47, 0xb8, 0xa8, 0x00, 0x64, 0x7a, 0x31, 0xc8, 0x61, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c,
  181. 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x8c, 0x0a, 0x80, 0x2a, 0xd1, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce,
  182. 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0x29, 0x4d, 0x62, 0x03, 0xeb, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff,
  183. 0xff, 0x13, 0xf8, 0xe8, 0x42, 0xdd, 0x00, 0x00, 0x00,
  184. }