any.pb.go 6.6 KB

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