OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / watcher / v1 / watch.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/watcher/v1/watch.proto
3
4 /*
5 Package watcher is a generated protocol buffer package.
6
7 It is generated from these files:
8         google/watcher/v1/watch.proto
9
10 It has these top-level messages:
11         Request
12         ChangeBatch
13         Change
14 */
15 package watcher
16
17 import proto "github.com/golang/protobuf/proto"
18 import fmt "fmt"
19 import math "math"
20 import _ "google.golang.org/genproto/googleapis/api/annotations"
21 import google_protobuf1 "github.com/golang/protobuf/ptypes/any"
22 import _ "github.com/golang/protobuf/ptypes/empty"
23
24 import (
25         context "golang.org/x/net/context"
26         grpc "google.golang.org/grpc"
27 )
28
29 // Reference imports to suppress errors if they are not otherwise used.
30 var _ = proto.Marshal
31 var _ = fmt.Errorf
32 var _ = math.Inf
33
34 // This is a compile-time assertion to ensure that this generated file
35 // is compatible with the proto package it is being compiled against.
36 // A compilation error at this line likely means your copy of the
37 // proto package needs to be updated.
38 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
39
40 // A reported value can be in one of the following states:
41 type Change_State int32
42
43 const (
44         // The element exists and its full value is included in data.
45         Change_EXISTS Change_State = 0
46         // The element does not exist.
47         Change_DOES_NOT_EXIST Change_State = 1
48         // Element may or may not exist. Used only for initial state delivery when
49         // the client is not interested in fetching the initial state. See the
50         // "Initial State" section above.
51         Change_INITIAL_STATE_SKIPPED Change_State = 2
52         // The element may exist, but some error has occurred. More information is
53         // available in the data field - the value is a serialized Status
54         // proto (from [google.rpc.Status][])
55         Change_ERROR Change_State = 3
56 )
57
58 var Change_State_name = map[int32]string{
59         0: "EXISTS",
60         1: "DOES_NOT_EXIST",
61         2: "INITIAL_STATE_SKIPPED",
62         3: "ERROR",
63 }
64 var Change_State_value = map[string]int32{
65         "EXISTS":                0,
66         "DOES_NOT_EXIST":        1,
67         "INITIAL_STATE_SKIPPED": 2,
68         "ERROR":                 3,
69 }
70
71 func (x Change_State) String() string {
72         return proto.EnumName(Change_State_name, int32(x))
73 }
74 func (Change_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
75
76 // The message used by the client to register interest in an entity.
77 type Request struct {
78         // The `target` value **must** be a valid URL path pointing to an entity
79         // to watch. Note that the service name **must** be
80         // removed from the target field (e.g., the target field must say
81         // "/foo/bar", not "myservice.googleapis.com/foo/bar"). A client is
82         // also allowed to pass system-specific parameters in the URL that
83         // are only obeyed by some implementations. Some parameters will be
84         // implementation-specific. However, some have predefined meaning
85         // and are listed here:
86         //
87         //  * recursive = true|false [default=false]
88         //    If set to true, indicates that the client wants to watch all elements
89         //    of entities in the subtree rooted at the entity's name in `target`. For
90         //    descendants that are not the immediate children of the target, the
91         //    `Change.element` will contain slashes.
92         //
93         //    Note that some namespaces and entities will not support recursive
94         //    watching. When watching such an entity, a client must not set recursive
95         //    to true. Otherwise, it will receive an `UNIMPLEMENTED` error.
96         //
97         // Normal URL encoding must be used inside `target`.  For example, if a query
98         // parameter name or value, or the non-query parameter portion of `target`
99         // contains a special character, it must be %-encoded.  We recommend that
100         // clients and servers use their runtime's URL library to produce and consume
101         // target values.
102         Target string `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"`
103         // The `resume_marker` specifies how much of the existing underlying state is
104         // delivered to the client when the watch request is received by the
105         // system. The client can set this marker in one of the following ways to get
106         // different semantics:
107         //
108         // *   Parameter is not specified or has the value "".
109         //     Semantics: Fetch initial state.
110         //     The client wants the entity's initial state to be delivered. See the
111         //     description in "Initial State".
112         //
113         // *   Parameter is set to the string "now" (UTF-8 encoding).
114         //     Semantics: Fetch new changes only.
115         //     The client just wants to get the changes received by the system after
116         //     the watch point. The system may deliver changes from before the watch
117         //     point as well.
118         //
119         // *   Parameter is set to a value received in an earlier
120         //     `Change.resume_marker` field while watching the same entity.
121         //     Semantics: Resume from a specific point.
122         //     The client wants to receive the changes from a specific point; this
123         //     value must correspond to a value received in the `Change.resume_marker`
124         //     field. The system may deliver changes from before the `resume_marker`
125         //     as well. If the system cannot resume the stream from this point (e.g.,
126         //     if it is too far behind in the stream), it can raise the
127         //     `FAILED_PRECONDITION` error.
128         //
129         // An implementation MUST support an unspecified parameter and the
130         // empty string "" marker (initial state fetching) and the "now" marker.
131         // It need not support resuming from a specific point.
132         ResumeMarker []byte `protobuf:"bytes,2,opt,name=resume_marker,json=resumeMarker,proto3" json:"resume_marker,omitempty"`
133 }
134
135 func (m *Request) Reset()                    { *m = Request{} }
136 func (m *Request) String() string            { return proto.CompactTextString(m) }
137 func (*Request) ProtoMessage()               {}
138 func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
139
140 func (m *Request) GetTarget() string {
141         if m != nil {
142                 return m.Target
143         }
144         return ""
145 }
146
147 func (m *Request) GetResumeMarker() []byte {
148         if m != nil {
149                 return m.ResumeMarker
150         }
151         return nil
152 }
153
154 // A batch of Change messages.
155 type ChangeBatch struct {
156         // A list of Change messages.
157         Changes []*Change `protobuf:"bytes,1,rep,name=changes" json:"changes,omitempty"`
158 }
159
160 func (m *ChangeBatch) Reset()                    { *m = ChangeBatch{} }
161 func (m *ChangeBatch) String() string            { return proto.CompactTextString(m) }
162 func (*ChangeBatch) ProtoMessage()               {}
163 func (*ChangeBatch) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
164
165 func (m *ChangeBatch) GetChanges() []*Change {
166         if m != nil {
167                 return m.Changes
168         }
169         return nil
170 }
171
172 // A Change indicates the most recent state of an element.
173 type Change struct {
174         // Name of the element, interpreted relative to the entity's actual
175         // name. "" refers to the entity itself. The element name is a valid
176         // UTF-8 string.
177         Element string `protobuf:"bytes,1,opt,name=element" json:"element,omitempty"`
178         // The state of the `element`.
179         State Change_State `protobuf:"varint,2,opt,name=state,enum=google.watcher.v1.Change_State" json:"state,omitempty"`
180         // The actual change data. This field is present only when `state() == EXISTS`
181         // or `state() == ERROR`. Please see [google.protobuf.Any][google.protobuf.Any] about how to use
182         // the Any type.
183         Data *google_protobuf1.Any `protobuf:"bytes,6,opt,name=data" json:"data,omitempty"`
184         // If present, provides a compact representation of all the messages that have
185         // been received by the caller for the given entity, e.g., it could be a
186         // sequence number or a multi-part timestamp/version vector. This marker can
187         // be provided in the Request message, allowing the caller to resume the stream
188         // watching at a specific point without fetching the initial state.
189         ResumeMarker []byte `protobuf:"bytes,4,opt,name=resume_marker,json=resumeMarker,proto3" json:"resume_marker,omitempty"`
190         // If true, this Change is followed by more Changes that are in the same group
191         // as this Change.
192         Continued bool `protobuf:"varint,5,opt,name=continued" json:"continued,omitempty"`
193 }
194
195 func (m *Change) Reset()                    { *m = Change{} }
196 func (m *Change) String() string            { return proto.CompactTextString(m) }
197 func (*Change) ProtoMessage()               {}
198 func (*Change) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
199
200 func (m *Change) GetElement() string {
201         if m != nil {
202                 return m.Element
203         }
204         return ""
205 }
206
207 func (m *Change) GetState() Change_State {
208         if m != nil {
209                 return m.State
210         }
211         return Change_EXISTS
212 }
213
214 func (m *Change) GetData() *google_protobuf1.Any {
215         if m != nil {
216                 return m.Data
217         }
218         return nil
219 }
220
221 func (m *Change) GetResumeMarker() []byte {
222         if m != nil {
223                 return m.ResumeMarker
224         }
225         return nil
226 }
227
228 func (m *Change) GetContinued() bool {
229         if m != nil {
230                 return m.Continued
231         }
232         return false
233 }
234
235 func init() {
236         proto.RegisterType((*Request)(nil), "google.watcher.v1.Request")
237         proto.RegisterType((*ChangeBatch)(nil), "google.watcher.v1.ChangeBatch")
238         proto.RegisterType((*Change)(nil), "google.watcher.v1.Change")
239         proto.RegisterEnum("google.watcher.v1.Change_State", Change_State_name, Change_State_value)
240 }
241
242 // Reference imports to suppress errors if they are not otherwise used.
243 var _ context.Context
244 var _ grpc.ClientConn
245
246 // This is a compile-time assertion to ensure that this generated file
247 // is compatible with the grpc package it is being compiled against.
248 const _ = grpc.SupportPackageIsVersion4
249
250 // Client API for Watcher service
251
252 type WatcherClient interface {
253         // Start a streaming RPC to get watch information from the server.
254         Watch(ctx context.Context, in *Request, opts ...grpc.CallOption) (Watcher_WatchClient, error)
255 }
256
257 type watcherClient struct {
258         cc *grpc.ClientConn
259 }
260
261 func NewWatcherClient(cc *grpc.ClientConn) WatcherClient {
262         return &watcherClient{cc}
263 }
264
265 func (c *watcherClient) Watch(ctx context.Context, in *Request, opts ...grpc.CallOption) (Watcher_WatchClient, error) {
266         stream, err := grpc.NewClientStream(ctx, &_Watcher_serviceDesc.Streams[0], c.cc, "/google.watcher.v1.Watcher/Watch", opts...)
267         if err != nil {
268                 return nil, err
269         }
270         x := &watcherWatchClient{stream}
271         if err := x.ClientStream.SendMsg(in); err != nil {
272                 return nil, err
273         }
274         if err := x.ClientStream.CloseSend(); err != nil {
275                 return nil, err
276         }
277         return x, nil
278 }
279
280 type Watcher_WatchClient interface {
281         Recv() (*ChangeBatch, error)
282         grpc.ClientStream
283 }
284
285 type watcherWatchClient struct {
286         grpc.ClientStream
287 }
288
289 func (x *watcherWatchClient) Recv() (*ChangeBatch, error) {
290         m := new(ChangeBatch)
291         if err := x.ClientStream.RecvMsg(m); err != nil {
292                 return nil, err
293         }
294         return m, nil
295 }
296
297 // Server API for Watcher service
298
299 type WatcherServer interface {
300         // Start a streaming RPC to get watch information from the server.
301         Watch(*Request, Watcher_WatchServer) error
302 }
303
304 func RegisterWatcherServer(s *grpc.Server, srv WatcherServer) {
305         s.RegisterService(&_Watcher_serviceDesc, srv)
306 }
307
308 func _Watcher_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
309         m := new(Request)
310         if err := stream.RecvMsg(m); err != nil {
311                 return err
312         }
313         return srv.(WatcherServer).Watch(m, &watcherWatchServer{stream})
314 }
315
316 type Watcher_WatchServer interface {
317         Send(*ChangeBatch) error
318         grpc.ServerStream
319 }
320
321 type watcherWatchServer struct {
322         grpc.ServerStream
323 }
324
325 func (x *watcherWatchServer) Send(m *ChangeBatch) error {
326         return x.ServerStream.SendMsg(m)
327 }
328
329 var _Watcher_serviceDesc = grpc.ServiceDesc{
330         ServiceName: "google.watcher.v1.Watcher",
331         HandlerType: (*WatcherServer)(nil),
332         Methods:     []grpc.MethodDesc{},
333         Streams: []grpc.StreamDesc{
334                 {
335                         StreamName:    "Watch",
336                         Handler:       _Watcher_Watch_Handler,
337                         ServerStreams: true,
338                 },
339         },
340         Metadata: "google/watcher/v1/watch.proto",
341 }
342
343 func init() { proto.RegisterFile("google/watcher/v1/watch.proto", fileDescriptor0) }
344
345 var fileDescriptor0 = []byte{
346         // 449 bytes of a gzipped FileDescriptorProto
347         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xdd, 0x6e, 0xd3, 0x30,
348         0x14, 0xc6, 0xdd, 0x92, 0xd2, 0xd3, 0x31, 0x75, 0x16, 0x43, 0x69, 0x19, 0x10, 0x85, 0x9b, 0x5c,
349         0x25, 0xac, 0x13, 0x12, 0x12, 0x57, 0x2d, 0x0b, 0x52, 0x04, 0x5b, 0x2b, 0x27, 0x12, 0x13, 0x37,
350         0x91, 0x97, 0x99, 0xac, 0xa2, 0xb1, 0x4b, 0xe2, 0x0e, 0xed, 0x96, 0x57, 0x40, 0x3c, 0x19, 0xaf,
351         0xc0, 0x83, 0xa0, 0xda, 0x0e, 0x20, 0xb2, 0xde, 0x9d, 0xf3, 0xfd, 0xd8, 0xe7, 0x3b, 0x36, 0x3c,
352         0x29, 0x84, 0x28, 0x96, 0x2c, 0xfc, 0x4a, 0x65, 0x7e, 0xcd, 0xaa, 0xf0, 0xe6, 0x58, 0x97, 0xc1,
353         0xaa, 0x12, 0x52, 0xe0, 0x03, 0x4d, 0x07, 0x86, 0x0e, 0x6e, 0x8e, 0x47, 0x47, 0xc6, 0x41, 0x57,
354         0x8b, 0x90, 0x72, 0x2e, 0x24, 0x95, 0x0b, 0xc1, 0x6b, 0x6d, 0x18, 0x0d, 0x0d, 0xab, 0xba, 0xcb,
355         0xf5, 0xa7, 0x90, 0xf2, 0x5b, 0x43, 0x3d, 0xfe, 0x9f, 0x62, 0xe5, 0x4a, 0x1a, 0xd2, 0x7b, 0x0b,
356         0x5d, 0xc2, 0xbe, 0xac, 0x59, 0x2d, 0xf1, 0x23, 0xb0, 0x25, 0xad, 0x0a, 0x26, 0x1d, 0xe4, 0x22,
357         0xbf, 0x47, 0x4c, 0x87, 0x9f, 0xc3, 0x83, 0x8a, 0xd5, 0xeb, 0x92, 0x65, 0x25, 0xad, 0x3e, 0xb3,
358         0xca, 0xe9, 0xb8, 0xc8, 0xdf, 0x23, 0x7b, 0x1a, 0x3c, 0x53, 0x98, 0x37, 0x85, 0xfe, 0x9b, 0x6b,
359         0xca, 0x0b, 0x36, 0xdd, 0x4c, 0x8c, 0x4f, 0xa0, 0x9b, 0xab, 0xb6, 0x76, 0x90, 0xbb, 0xe3, 0xf7,
360         0xc7, 0xc3, 0xa0, 0x95, 0x28, 0xd0, 0x06, 0xd2, 0x28, 0xbd, 0x1f, 0x1d, 0xb0, 0x35, 0x86, 0x1d,
361         0xe8, 0xb2, 0x25, 0x2b, 0x19, 0x6f, 0x86, 0x69, 0x5a, 0xfc, 0x12, 0xac, 0x5a, 0x52, 0xc9, 0xd4,
362         0x14, 0xfb, 0xe3, 0x67, 0x5b, 0xcf, 0x0d, 0x92, 0x8d, 0x8c, 0x68, 0x35, 0xf6, 0x61, 0xf7, 0x8a,
363         0x4a, 0xea, 0xd8, 0x2e, 0xf2, 0xfb, 0xe3, 0x87, 0x8d, 0xab, 0xd9, 0x49, 0x30, 0xe1, 0xb7, 0x44,
364         0x29, 0xda, 0x71, 0x77, 0xdb, 0x71, 0xf1, 0x11, 0xf4, 0x72, 0xc1, 0xe5, 0x82, 0xaf, 0xd9, 0x95,
365         0x63, 0xb9, 0xc8, 0xbf, 0x4f, 0xfe, 0x02, 0xde, 0x19, 0x58, 0xea, 0x72, 0x0c, 0x60, 0x47, 0x17,
366         0x71, 0x92, 0x26, 0x83, 0x7b, 0x18, 0xc3, 0xfe, 0xe9, 0x2c, 0x4a, 0xb2, 0xf3, 0x59, 0x9a, 0x29,
367         0x70, 0x80, 0xf0, 0x10, 0x0e, 0xe3, 0xf3, 0x38, 0x8d, 0x27, 0xef, 0xb3, 0x24, 0x9d, 0xa4, 0x51,
368         0x96, 0xbc, 0x8b, 0xe7, 0xf3, 0xe8, 0x74, 0xd0, 0xc1, 0x3d, 0xb0, 0x22, 0x42, 0x66, 0x64, 0xb0,
369         0x33, 0xce, 0xa1, 0xfb, 0x41, 0xa7, 0xc3, 0x17, 0x60, 0xa9, 0x12, 0x8f, 0xee, 0xc8, 0x6d, 0x1e,
370         0x72, 0xf4, 0x74, 0xeb, 0x4e, 0xd4, 0xe3, 0x78, 0x07, 0xdf, 0x7e, 0xfe, 0xfa, 0xde, 0xe9, 0xe3,
371         0xde, 0x9f, 0x5f, 0xf7, 0x02, 0x4d, 0x33, 0x38, 0xcc, 0x45, 0xd9, 0x76, 0x4e, 0x41, 0x5d, 0x38,
372         0xdf, 0x2c, 0x6a, 0x8e, 0x3e, 0xbe, 0x32, 0x82, 0x42, 0x2c, 0x29, 0x2f, 0x02, 0x51, 0x15, 0x61,
373         0xc1, 0xb8, 0x5a, 0x63, 0xa8, 0x29, 0xba, 0x5a, 0xd4, 0xff, 0x7c, 0xeb, 0xd7, 0xa6, 0xbc, 0xb4,
374         0x95, 0xe8, 0xe4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x48, 0x0a, 0xba, 0x6c, 0xfa, 0x02, 0x00,
375         0x00,
376 }