You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

727 lines
28 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/longrunning/operations.proto
  3. package longrunning // import "google.golang.org/genproto/googleapis/longrunning"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import any "github.com/golang/protobuf/ptypes/any"
  8. import empty "github.com/golang/protobuf/ptypes/empty"
  9. import _ "google.golang.org/genproto/googleapis/api/annotations"
  10. import status "google.golang.org/genproto/googleapis/rpc/status"
  11. import (
  12. context "golang.org/x/net/context"
  13. grpc "google.golang.org/grpc"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  24. // This resource represents a long-running operation that is the result of a
  25. // network API call.
  26. type Operation struct {
  27. // The server-assigned name, which is only unique within the same service that
  28. // originally returns it. If you use the default HTTP mapping, the
  29. // `name` should have the format of `operations/some/unique/name`.
  30. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  31. // Service-specific metadata associated with the operation. It typically
  32. // contains progress information and common metadata such as create time.
  33. // Some services might not provide such metadata. Any method that returns a
  34. // long-running operation should document the metadata type, if any.
  35. Metadata *any.Any `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
  36. // If the value is `false`, it means the operation is still in progress.
  37. // If true, the operation is completed, and either `error` or `response` is
  38. // available.
  39. Done bool `protobuf:"varint,3,opt,name=done,proto3" json:"done,omitempty"`
  40. // The operation result, which can be either an `error` or a valid `response`.
  41. // If `done` == `false`, neither `error` nor `response` is set.
  42. // If `done` == `true`, exactly one of `error` or `response` is set.
  43. //
  44. // Types that are valid to be assigned to Result:
  45. // *Operation_Error
  46. // *Operation_Response
  47. Result isOperation_Result `protobuf_oneof:"result"`
  48. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  49. XXX_unrecognized []byte `json:"-"`
  50. XXX_sizecache int32 `json:"-"`
  51. }
  52. func (m *Operation) Reset() { *m = Operation{} }
  53. func (m *Operation) String() string { return proto.CompactTextString(m) }
  54. func (*Operation) ProtoMessage() {}
  55. func (*Operation) Descriptor() ([]byte, []int) {
  56. return fileDescriptor_operations_e03d010aa0ab3f7f, []int{0}
  57. }
  58. func (m *Operation) XXX_Unmarshal(b []byte) error {
  59. return xxx_messageInfo_Operation.Unmarshal(m, b)
  60. }
  61. func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  62. return xxx_messageInfo_Operation.Marshal(b, m, deterministic)
  63. }
  64. func (dst *Operation) XXX_Merge(src proto.Message) {
  65. xxx_messageInfo_Operation.Merge(dst, src)
  66. }
  67. func (m *Operation) XXX_Size() int {
  68. return xxx_messageInfo_Operation.Size(m)
  69. }
  70. func (m *Operation) XXX_DiscardUnknown() {
  71. xxx_messageInfo_Operation.DiscardUnknown(m)
  72. }
  73. var xxx_messageInfo_Operation proto.InternalMessageInfo
  74. func (m *Operation) GetName() string {
  75. if m != nil {
  76. return m.Name
  77. }
  78. return ""
  79. }
  80. func (m *Operation) GetMetadata() *any.Any {
  81. if m != nil {
  82. return m.Metadata
  83. }
  84. return nil
  85. }
  86. func (m *Operation) GetDone() bool {
  87. if m != nil {
  88. return m.Done
  89. }
  90. return false
  91. }
  92. type isOperation_Result interface {
  93. isOperation_Result()
  94. }
  95. type Operation_Error struct {
  96. Error *status.Status `protobuf:"bytes,4,opt,name=error,proto3,oneof"`
  97. }
  98. type Operation_Response struct {
  99. Response *any.Any `protobuf:"bytes,5,opt,name=response,proto3,oneof"`
  100. }
  101. func (*Operation_Error) isOperation_Result() {}
  102. func (*Operation_Response) isOperation_Result() {}
  103. func (m *Operation) GetResult() isOperation_Result {
  104. if m != nil {
  105. return m.Result
  106. }
  107. return nil
  108. }
  109. func (m *Operation) GetError() *status.Status {
  110. if x, ok := m.GetResult().(*Operation_Error); ok {
  111. return x.Error
  112. }
  113. return nil
  114. }
  115. func (m *Operation) GetResponse() *any.Any {
  116. if x, ok := m.GetResult().(*Operation_Response); ok {
  117. return x.Response
  118. }
  119. return nil
  120. }
  121. // XXX_OneofFuncs is for the internal use of the proto package.
  122. func (*Operation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  123. return _Operation_OneofMarshaler, _Operation_OneofUnmarshaler, _Operation_OneofSizer, []interface{}{
  124. (*Operation_Error)(nil),
  125. (*Operation_Response)(nil),
  126. }
  127. }
  128. func _Operation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  129. m := msg.(*Operation)
  130. // result
  131. switch x := m.Result.(type) {
  132. case *Operation_Error:
  133. b.EncodeVarint(4<<3 | proto.WireBytes)
  134. if err := b.EncodeMessage(x.Error); err != nil {
  135. return err
  136. }
  137. case *Operation_Response:
  138. b.EncodeVarint(5<<3 | proto.WireBytes)
  139. if err := b.EncodeMessage(x.Response); err != nil {
  140. return err
  141. }
  142. case nil:
  143. default:
  144. return fmt.Errorf("Operation.Result has unexpected type %T", x)
  145. }
  146. return nil
  147. }
  148. func _Operation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  149. m := msg.(*Operation)
  150. switch tag {
  151. case 4: // result.error
  152. if wire != proto.WireBytes {
  153. return true, proto.ErrInternalBadWireType
  154. }
  155. msg := new(status.Status)
  156. err := b.DecodeMessage(msg)
  157. m.Result = &Operation_Error{msg}
  158. return true, err
  159. case 5: // result.response
  160. if wire != proto.WireBytes {
  161. return true, proto.ErrInternalBadWireType
  162. }
  163. msg := new(any.Any)
  164. err := b.DecodeMessage(msg)
  165. m.Result = &Operation_Response{msg}
  166. return true, err
  167. default:
  168. return false, nil
  169. }
  170. }
  171. func _Operation_OneofSizer(msg proto.Message) (n int) {
  172. m := msg.(*Operation)
  173. // result
  174. switch x := m.Result.(type) {
  175. case *Operation_Error:
  176. s := proto.Size(x.Error)
  177. n += 1 // tag and wire
  178. n += proto.SizeVarint(uint64(s))
  179. n += s
  180. case *Operation_Response:
  181. s := proto.Size(x.Response)
  182. n += 1 // tag and wire
  183. n += proto.SizeVarint(uint64(s))
  184. n += s
  185. case nil:
  186. default:
  187. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  188. }
  189. return n
  190. }
  191. // The request message for
  192. // [Operations.GetOperation][google.longrunning.Operations.GetOperation].
  193. type GetOperationRequest struct {
  194. // The name of the operation resource.
  195. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  196. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  197. XXX_unrecognized []byte `json:"-"`
  198. XXX_sizecache int32 `json:"-"`
  199. }
  200. func (m *GetOperationRequest) Reset() { *m = GetOperationRequest{} }
  201. func (m *GetOperationRequest) String() string { return proto.CompactTextString(m) }
  202. func (*GetOperationRequest) ProtoMessage() {}
  203. func (*GetOperationRequest) Descriptor() ([]byte, []int) {
  204. return fileDescriptor_operations_e03d010aa0ab3f7f, []int{1}
  205. }
  206. func (m *GetOperationRequest) XXX_Unmarshal(b []byte) error {
  207. return xxx_messageInfo_GetOperationRequest.Unmarshal(m, b)
  208. }
  209. func (m *GetOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  210. return xxx_messageInfo_GetOperationRequest.Marshal(b, m, deterministic)
  211. }
  212. func (dst *GetOperationRequest) XXX_Merge(src proto.Message) {
  213. xxx_messageInfo_GetOperationRequest.Merge(dst, src)
  214. }
  215. func (m *GetOperationRequest) XXX_Size() int {
  216. return xxx_messageInfo_GetOperationRequest.Size(m)
  217. }
  218. func (m *GetOperationRequest) XXX_DiscardUnknown() {
  219. xxx_messageInfo_GetOperationRequest.DiscardUnknown(m)
  220. }
  221. var xxx_messageInfo_GetOperationRequest proto.InternalMessageInfo
  222. func (m *GetOperationRequest) GetName() string {
  223. if m != nil {
  224. return m.Name
  225. }
  226. return ""
  227. }
  228. // The request message for
  229. // [Operations.ListOperations][google.longrunning.Operations.ListOperations].
  230. type ListOperationsRequest struct {
  231. // The name of the operation collection.
  232. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
  233. // The standard list filter.
  234. Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
  235. // The standard list page size.
  236. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
  237. // The standard list page token.
  238. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
  239. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  240. XXX_unrecognized []byte `json:"-"`
  241. XXX_sizecache int32 `json:"-"`
  242. }
  243. func (m *ListOperationsRequest) Reset() { *m = ListOperationsRequest{} }
  244. func (m *ListOperationsRequest) String() string { return proto.CompactTextString(m) }
  245. func (*ListOperationsRequest) ProtoMessage() {}
  246. func (*ListOperationsRequest) Descriptor() ([]byte, []int) {
  247. return fileDescriptor_operations_e03d010aa0ab3f7f, []int{2}
  248. }
  249. func (m *ListOperationsRequest) XXX_Unmarshal(b []byte) error {
  250. return xxx_messageInfo_ListOperationsRequest.Unmarshal(m, b)
  251. }
  252. func (m *ListOperationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  253. return xxx_messageInfo_ListOperationsRequest.Marshal(b, m, deterministic)
  254. }
  255. func (dst *ListOperationsRequest) XXX_Merge(src proto.Message) {
  256. xxx_messageInfo_ListOperationsRequest.Merge(dst, src)
  257. }
  258. func (m *ListOperationsRequest) XXX_Size() int {
  259. return xxx_messageInfo_ListOperationsRequest.Size(m)
  260. }
  261. func (m *ListOperationsRequest) XXX_DiscardUnknown() {
  262. xxx_messageInfo_ListOperationsRequest.DiscardUnknown(m)
  263. }
  264. var xxx_messageInfo_ListOperationsRequest proto.InternalMessageInfo
  265. func (m *ListOperationsRequest) GetName() string {
  266. if m != nil {
  267. return m.Name
  268. }
  269. return ""
  270. }
  271. func (m *ListOperationsRequest) GetFilter() string {
  272. if m != nil {
  273. return m.Filter
  274. }
  275. return ""
  276. }
  277. func (m *ListOperationsRequest) GetPageSize() int32 {
  278. if m != nil {
  279. return m.PageSize
  280. }
  281. return 0
  282. }
  283. func (m *ListOperationsRequest) GetPageToken() string {
  284. if m != nil {
  285. return m.PageToken
  286. }
  287. return ""
  288. }
  289. // The response message for
  290. // [Operations.ListOperations][google.longrunning.Operations.ListOperations].
  291. type ListOperationsResponse struct {
  292. // A list of operations that matches the specified filter in the request.
  293. Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
  294. // The standard List next-page token.
  295. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
  296. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  297. XXX_unrecognized []byte `json:"-"`
  298. XXX_sizecache int32 `json:"-"`
  299. }
  300. func (m *ListOperationsResponse) Reset() { *m = ListOperationsResponse{} }
  301. func (m *ListOperationsResponse) String() string { return proto.CompactTextString(m) }
  302. func (*ListOperationsResponse) ProtoMessage() {}
  303. func (*ListOperationsResponse) Descriptor() ([]byte, []int) {
  304. return fileDescriptor_operations_e03d010aa0ab3f7f, []int{3}
  305. }
  306. func (m *ListOperationsResponse) XXX_Unmarshal(b []byte) error {
  307. return xxx_messageInfo_ListOperationsResponse.Unmarshal(m, b)
  308. }
  309. func (m *ListOperationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  310. return xxx_messageInfo_ListOperationsResponse.Marshal(b, m, deterministic)
  311. }
  312. func (dst *ListOperationsResponse) XXX_Merge(src proto.Message) {
  313. xxx_messageInfo_ListOperationsResponse.Merge(dst, src)
  314. }
  315. func (m *ListOperationsResponse) XXX_Size() int {
  316. return xxx_messageInfo_ListOperationsResponse.Size(m)
  317. }
  318. func (m *ListOperationsResponse) XXX_DiscardUnknown() {
  319. xxx_messageInfo_ListOperationsResponse.DiscardUnknown(m)
  320. }
  321. var xxx_messageInfo_ListOperationsResponse proto.InternalMessageInfo
  322. func (m *ListOperationsResponse) GetOperations() []*Operation {
  323. if m != nil {
  324. return m.Operations
  325. }
  326. return nil
  327. }
  328. func (m *ListOperationsResponse) GetNextPageToken() string {
  329. if m != nil {
  330. return m.NextPageToken
  331. }
  332. return ""
  333. }
  334. // The request message for
  335. // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
  336. type CancelOperationRequest struct {
  337. // The name of the operation resource to be cancelled.
  338. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  339. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  340. XXX_unrecognized []byte `json:"-"`
  341. XXX_sizecache int32 `json:"-"`
  342. }
  343. func (m *CancelOperationRequest) Reset() { *m = CancelOperationRequest{} }
  344. func (m *CancelOperationRequest) String() string { return proto.CompactTextString(m) }
  345. func (*CancelOperationRequest) ProtoMessage() {}
  346. func (*CancelOperationRequest) Descriptor() ([]byte, []int) {
  347. return fileDescriptor_operations_e03d010aa0ab3f7f, []int{4}
  348. }
  349. func (m *CancelOperationRequest) XXX_Unmarshal(b []byte) error {
  350. return xxx_messageInfo_CancelOperationRequest.Unmarshal(m, b)
  351. }
  352. func (m *CancelOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  353. return xxx_messageInfo_CancelOperationRequest.Marshal(b, m, deterministic)
  354. }
  355. func (dst *CancelOperationRequest) XXX_Merge(src proto.Message) {
  356. xxx_messageInfo_CancelOperationRequest.Merge(dst, src)
  357. }
  358. func (m *CancelOperationRequest) XXX_Size() int {
  359. return xxx_messageInfo_CancelOperationRequest.Size(m)
  360. }
  361. func (m *CancelOperationRequest) XXX_DiscardUnknown() {
  362. xxx_messageInfo_CancelOperationRequest.DiscardUnknown(m)
  363. }
  364. var xxx_messageInfo_CancelOperationRequest proto.InternalMessageInfo
  365. func (m *CancelOperationRequest) GetName() string {
  366. if m != nil {
  367. return m.Name
  368. }
  369. return ""
  370. }
  371. // The request message for
  372. // [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
  373. type DeleteOperationRequest struct {
  374. // The name of the operation resource to be deleted.
  375. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  376. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  377. XXX_unrecognized []byte `json:"-"`
  378. XXX_sizecache int32 `json:"-"`
  379. }
  380. func (m *DeleteOperationRequest) Reset() { *m = DeleteOperationRequest{} }
  381. func (m *DeleteOperationRequest) String() string { return proto.CompactTextString(m) }
  382. func (*DeleteOperationRequest) ProtoMessage() {}
  383. func (*DeleteOperationRequest) Descriptor() ([]byte, []int) {
  384. return fileDescriptor_operations_e03d010aa0ab3f7f, []int{5}
  385. }
  386. func (m *DeleteOperationRequest) XXX_Unmarshal(b []byte) error {
  387. return xxx_messageInfo_DeleteOperationRequest.Unmarshal(m, b)
  388. }
  389. func (m *DeleteOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  390. return xxx_messageInfo_DeleteOperationRequest.Marshal(b, m, deterministic)
  391. }
  392. func (dst *DeleteOperationRequest) XXX_Merge(src proto.Message) {
  393. xxx_messageInfo_DeleteOperationRequest.Merge(dst, src)
  394. }
  395. func (m *DeleteOperationRequest) XXX_Size() int {
  396. return xxx_messageInfo_DeleteOperationRequest.Size(m)
  397. }
  398. func (m *DeleteOperationRequest) XXX_DiscardUnknown() {
  399. xxx_messageInfo_DeleteOperationRequest.DiscardUnknown(m)
  400. }
  401. var xxx_messageInfo_DeleteOperationRequest proto.InternalMessageInfo
  402. func (m *DeleteOperationRequest) GetName() string {
  403. if m != nil {
  404. return m.Name
  405. }
  406. return ""
  407. }
  408. func init() {
  409. proto.RegisterType((*Operation)(nil), "google.longrunning.Operation")
  410. proto.RegisterType((*GetOperationRequest)(nil), "google.longrunning.GetOperationRequest")
  411. proto.RegisterType((*ListOperationsRequest)(nil), "google.longrunning.ListOperationsRequest")
  412. proto.RegisterType((*ListOperationsResponse)(nil), "google.longrunning.ListOperationsResponse")
  413. proto.RegisterType((*CancelOperationRequest)(nil), "google.longrunning.CancelOperationRequest")
  414. proto.RegisterType((*DeleteOperationRequest)(nil), "google.longrunning.DeleteOperationRequest")
  415. }
  416. // Reference imports to suppress errors if they are not otherwise used.
  417. var _ context.Context
  418. var _ grpc.ClientConn
  419. // This is a compile-time assertion to ensure that this generated file
  420. // is compatible with the grpc package it is being compiled against.
  421. const _ = grpc.SupportPackageIsVersion4
  422. // OperationsClient is the client API for Operations service.
  423. //
  424. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  425. type OperationsClient interface {
  426. // Lists operations that match the specified filter in the request. If the
  427. // server doesn't support this method, it returns `UNIMPLEMENTED`.
  428. //
  429. // NOTE: the `name` binding below allows API services to override the binding
  430. // to use different resource name schemes, such as `users/*/operations`.
  431. ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error)
  432. // Gets the latest state of a long-running operation. Clients can use this
  433. // method to poll the operation result at intervals as recommended by the API
  434. // service.
  435. GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error)
  436. // Deletes a long-running operation. This method indicates that the client is
  437. // no longer interested in the operation result. It does not cancel the
  438. // operation. If the server doesn't support this method, it returns
  439. // `google.rpc.Code.UNIMPLEMENTED`.
  440. DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
  441. // Starts asynchronous cancellation on a long-running operation. The server
  442. // makes a best effort to cancel the operation, but success is not
  443. // guaranteed. If the server doesn't support this method, it returns
  444. // `google.rpc.Code.UNIMPLEMENTED`. Clients can use
  445. // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
  446. // other methods to check whether the cancellation succeeded or whether the
  447. // operation completed despite cancellation. On successful cancellation,
  448. // the operation is not deleted; instead, it becomes an operation with
  449. // an [Operation.error][google.longrunning.Operation.error] value with a
  450. // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
  451. // `Code.CANCELLED`.
  452. CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
  453. }
  454. type operationsClient struct {
  455. cc *grpc.ClientConn
  456. }
  457. func NewOperationsClient(cc *grpc.ClientConn) OperationsClient {
  458. return &operationsClient{cc}
  459. }
  460. func (c *operationsClient) ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) {
  461. out := new(ListOperationsResponse)
  462. err := c.cc.Invoke(ctx, "/google.longrunning.Operations/ListOperations", in, out, opts...)
  463. if err != nil {
  464. return nil, err
  465. }
  466. return out, nil
  467. }
  468. func (c *operationsClient) GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) {
  469. out := new(Operation)
  470. err := c.cc.Invoke(ctx, "/google.longrunning.Operations/GetOperation", in, out, opts...)
  471. if err != nil {
  472. return nil, err
  473. }
  474. return out, nil
  475. }
  476. func (c *operationsClient) DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
  477. out := new(empty.Empty)
  478. err := c.cc.Invoke(ctx, "/google.longrunning.Operations/DeleteOperation", in, out, opts...)
  479. if err != nil {
  480. return nil, err
  481. }
  482. return out, nil
  483. }
  484. func (c *operationsClient) CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
  485. out := new(empty.Empty)
  486. err := c.cc.Invoke(ctx, "/google.longrunning.Operations/CancelOperation", in, out, opts...)
  487. if err != nil {
  488. return nil, err
  489. }
  490. return out, nil
  491. }
  492. // OperationsServer is the server API for Operations service.
  493. type OperationsServer interface {
  494. // Lists operations that match the specified filter in the request. If the
  495. // server doesn't support this method, it returns `UNIMPLEMENTED`.
  496. //
  497. // NOTE: the `name` binding below allows API services to override the binding
  498. // to use different resource name schemes, such as `users/*/operations`.
  499. ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error)
  500. // Gets the latest state of a long-running operation. Clients can use this
  501. // method to poll the operation result at intervals as recommended by the API
  502. // service.
  503. GetOperation(context.Context, *GetOperationRequest) (*Operation, error)
  504. // Deletes a long-running operation. This method indicates that the client is
  505. // no longer interested in the operation result. It does not cancel the
  506. // operation. If the server doesn't support this method, it returns
  507. // `google.rpc.Code.UNIMPLEMENTED`.
  508. DeleteOperation(context.Context, *DeleteOperationRequest) (*empty.Empty, error)
  509. // Starts asynchronous cancellation on a long-running operation. The server
  510. // makes a best effort to cancel the operation, but success is not
  511. // guaranteed. If the server doesn't support this method, it returns
  512. // `google.rpc.Code.UNIMPLEMENTED`. Clients can use
  513. // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
  514. // other methods to check whether the cancellation succeeded or whether the
  515. // operation completed despite cancellation. On successful cancellation,
  516. // the operation is not deleted; instead, it becomes an operation with
  517. // an [Operation.error][google.longrunning.Operation.error] value with a
  518. // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
  519. // `Code.CANCELLED`.
  520. CancelOperation(context.Context, *CancelOperationRequest) (*empty.Empty, error)
  521. }
  522. func RegisterOperationsServer(s *grpc.Server, srv OperationsServer) {
  523. s.RegisterService(&_Operations_serviceDesc, srv)
  524. }
  525. func _Operations_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  526. in := new(ListOperationsRequest)
  527. if err := dec(in); err != nil {
  528. return nil, err
  529. }
  530. if interceptor == nil {
  531. return srv.(OperationsServer).ListOperations(ctx, in)
  532. }
  533. info := &grpc.UnaryServerInfo{
  534. Server: srv,
  535. FullMethod: "/google.longrunning.Operations/ListOperations",
  536. }
  537. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  538. return srv.(OperationsServer).ListOperations(ctx, req.(*ListOperationsRequest))
  539. }
  540. return interceptor(ctx, in, info, handler)
  541. }
  542. func _Operations_GetOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  543. in := new(GetOperationRequest)
  544. if err := dec(in); err != nil {
  545. return nil, err
  546. }
  547. if interceptor == nil {
  548. return srv.(OperationsServer).GetOperation(ctx, in)
  549. }
  550. info := &grpc.UnaryServerInfo{
  551. Server: srv,
  552. FullMethod: "/google.longrunning.Operations/GetOperation",
  553. }
  554. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  555. return srv.(OperationsServer).GetOperation(ctx, req.(*GetOperationRequest))
  556. }
  557. return interceptor(ctx, in, info, handler)
  558. }
  559. func _Operations_DeleteOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  560. in := new(DeleteOperationRequest)
  561. if err := dec(in); err != nil {
  562. return nil, err
  563. }
  564. if interceptor == nil {
  565. return srv.(OperationsServer).DeleteOperation(ctx, in)
  566. }
  567. info := &grpc.UnaryServerInfo{
  568. Server: srv,
  569. FullMethod: "/google.longrunning.Operations/DeleteOperation",
  570. }
  571. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  572. return srv.(OperationsServer).DeleteOperation(ctx, req.(*DeleteOperationRequest))
  573. }
  574. return interceptor(ctx, in, info, handler)
  575. }
  576. func _Operations_CancelOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  577. in := new(CancelOperationRequest)
  578. if err := dec(in); err != nil {
  579. return nil, err
  580. }
  581. if interceptor == nil {
  582. return srv.(OperationsServer).CancelOperation(ctx, in)
  583. }
  584. info := &grpc.UnaryServerInfo{
  585. Server: srv,
  586. FullMethod: "/google.longrunning.Operations/CancelOperation",
  587. }
  588. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  589. return srv.(OperationsServer).CancelOperation(ctx, req.(*CancelOperationRequest))
  590. }
  591. return interceptor(ctx, in, info, handler)
  592. }
  593. var _Operations_serviceDesc = grpc.ServiceDesc{
  594. ServiceName: "google.longrunning.Operations",
  595. HandlerType: (*OperationsServer)(nil),
  596. Methods: []grpc.MethodDesc{
  597. {
  598. MethodName: "ListOperations",
  599. Handler: _Operations_ListOperations_Handler,
  600. },
  601. {
  602. MethodName: "GetOperation",
  603. Handler: _Operations_GetOperation_Handler,
  604. },
  605. {
  606. MethodName: "DeleteOperation",
  607. Handler: _Operations_DeleteOperation_Handler,
  608. },
  609. {
  610. MethodName: "CancelOperation",
  611. Handler: _Operations_CancelOperation_Handler,
  612. },
  613. },
  614. Streams: []grpc.StreamDesc{},
  615. Metadata: "google/longrunning/operations.proto",
  616. }
  617. func init() {
  618. proto.RegisterFile("google/longrunning/operations.proto", fileDescriptor_operations_e03d010aa0ab3f7f)
  619. }
  620. var fileDescriptor_operations_e03d010aa0ab3f7f = []byte{
  621. // 597 bytes of a gzipped FileDescriptorProto
  622. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xc1, 0x6e, 0xd3, 0x4c,
  623. 0x10, 0xae, 0xd3, 0xb4, 0x4a, 0xa6, 0xff, 0x4f, 0xa4, 0x85, 0xba, 0xc6, 0x25, 0x22, 0x32, 0x08,
  624. 0x52, 0xab, 0xb2, 0x21, 0xdc, 0x8a, 0x72, 0x20, 0x80, 0xda, 0x43, 0x25, 0x22, 0x97, 0x13, 0x42,
  625. 0xaa, 0xb6, 0xe9, 0xd4, 0xb2, 0x70, 0x76, 0xcd, 0x7a, 0x03, 0x6d, 0x51, 0x55, 0xc1, 0x81, 0x13,
  626. 0x37, 0x78, 0x0a, 0x1e, 0x85, 0x0b, 0x07, 0x5e, 0x81, 0x07, 0x41, 0x5e, 0xdb, 0xb1, 0x49, 0x1d,
  627. 0x94, 0xdb, 0x7a, 0xe6, 0x9b, 0xf9, 0xe6, 0xfb, 0x76, 0xd6, 0x70, 0xc7, 0xe7, 0xdc, 0x0f, 0xd1,
  628. 0x0d, 0x39, 0xf3, 0xc5, 0x84, 0xb1, 0x80, 0xf9, 0x2e, 0x8f, 0x50, 0x50, 0x19, 0x70, 0x16, 0x3b,
  629. 0x91, 0xe0, 0x92, 0x13, 0x92, 0x82, 0x9c, 0x12, 0xc8, 0xbc, 0x95, 0x15, 0xd2, 0x28, 0x70, 0x29,
  630. 0x63, 0x5c, 0x96, 0x2b, 0xcc, 0x9b, 0x59, 0x56, 0x7d, 0x1d, 0x4d, 0x4e, 0x5c, 0xca, 0xce, 0xb2,
  631. 0xd4, 0xe6, 0x6c, 0x0a, 0xc7, 0x91, 0xcc, 0x93, 0x1b, 0x59, 0x52, 0x44, 0x23, 0x37, 0x96, 0x54,
  632. 0x4e, 0xb2, 0x86, 0xd6, 0x4f, 0x0d, 0x9a, 0x2f, 0xf2, 0xb9, 0x08, 0x81, 0x3a, 0xa3, 0x63, 0x34,
  633. 0xb4, 0x8e, 0xd6, 0x6d, 0x7a, 0xea, 0x4c, 0x1e, 0x40, 0x63, 0x8c, 0x92, 0x1e, 0x53, 0x49, 0x8d,
  634. 0x5a, 0x47, 0xeb, 0xae, 0xf5, 0x6e, 0x38, 0xd9, 0xdc, 0x39, 0x95, 0xf3, 0x84, 0x9d, 0x79, 0x53,
  635. 0x54, 0xd2, 0xe5, 0x98, 0x33, 0x34, 0x96, 0x3b, 0x5a, 0xb7, 0xe1, 0xa9, 0x33, 0xb1, 0x61, 0x05,
  636. 0x85, 0xe0, 0xc2, 0xa8, 0xab, 0x16, 0x24, 0x6f, 0x21, 0xa2, 0x91, 0x73, 0xa0, 0x06, 0xda, 0x5b,
  637. 0xf2, 0x52, 0x08, 0xe9, 0x41, 0x43, 0x60, 0x1c, 0x71, 0x16, 0xa3, 0xb1, 0x32, 0x9f, 0x71, 0x6f,
  638. 0xc9, 0x9b, 0xe2, 0x06, 0x0d, 0x58, 0x15, 0x18, 0x4f, 0x42, 0x69, 0x6d, 0xc1, 0xf5, 0x5d, 0x94,
  639. 0x53, 0x4d, 0x1e, 0xbe, 0x9d, 0x60, 0x2c, 0xab, 0xa4, 0x59, 0x97, 0xb0, 0xbe, 0x1f, 0xc4, 0x05,
  640. 0x36, 0x9e, 0x05, 0xd7, 0x4b, 0x3e, 0xe8, 0xb0, 0x7a, 0x12, 0x84, 0x12, 0x45, 0xd6, 0x22, 0xfb,
  641. 0x22, 0x9b, 0xd0, 0x8c, 0xa8, 0x8f, 0x87, 0x71, 0x70, 0x8e, 0xca, 0xa0, 0x15, 0xaf, 0x91, 0x04,
  642. 0x0e, 0x82, 0x73, 0x24, 0x6d, 0x00, 0x95, 0x94, 0xfc, 0x0d, 0x32, 0x65, 0x48, 0xd3, 0x53, 0xf0,
  643. 0x97, 0x49, 0xc0, 0xba, 0x04, 0x7d, 0x76, 0x80, 0x54, 0x0f, 0xe9, 0x03, 0x14, 0xeb, 0x62, 0x68,
  644. 0x9d, 0xe5, 0xee, 0x5a, 0xaf, 0xed, 0x5c, 0xdd, 0x17, 0xa7, 0x10, 0x5a, 0x2a, 0x20, 0xf7, 0xa0,
  645. 0xc5, 0xf0, 0x54, 0x1e, 0x96, 0xc8, 0x6b, 0x8a, 0xfc, 0xff, 0x24, 0x3c, 0x9c, 0x0e, 0xb0, 0x0d,
  646. 0xfa, 0x53, 0xca, 0x46, 0x18, 0x2e, 0xe4, 0xd7, 0x36, 0xe8, 0xcf, 0x30, 0x44, 0x89, 0x8b, 0xa0,
  647. 0x7b, 0x5f, 0xea, 0x00, 0x85, 0x32, 0xf2, 0x59, 0x83, 0x6b, 0x7f, 0x8b, 0x25, 0x5b, 0x55, 0x82,
  648. 0x2a, 0x6f, 0xc4, 0xb4, 0x17, 0x81, 0xa6, 0xde, 0x59, 0xed, 0x4f, 0xbf, 0x7e, 0x7f, 0xad, 0x6d,
  649. 0x90, 0x75, 0xf7, 0xdd, 0x43, 0xf7, 0x43, 0x32, 0x4b, 0xbf, 0xb0, 0xe6, 0x82, 0x9c, 0xc2, 0x7f,
  650. 0xe5, 0x05, 0x21, 0xf7, 0xab, 0x5a, 0x57, 0xac, 0x90, 0xf9, 0x6f, 0xff, 0xad, 0x8e, 0xa2, 0x35,
  651. 0x89, 0x51, 0x45, 0xeb, 0xda, 0xf6, 0x05, 0x79, 0x0f, 0xad, 0x19, 0xff, 0x48, 0xa5, 0xae, 0x6a,
  652. 0x93, 0x4d, 0xfd, 0xca, 0x2b, 0x78, 0x9e, 0x3c, 0xf1, 0x9c, 0xd8, 0x9e, 0x4f, 0xfc, 0x51, 0x83,
  653. 0xd6, 0xcc, 0x3d, 0x57, 0x33, 0x57, 0x2f, 0xc3, 0x5c, 0x66, 0x5b, 0x31, 0xdf, 0xb5, 0x6e, 0xcf,
  654. 0x63, 0xde, 0x19, 0xa9, 0x86, 0x3b, 0x9a, 0x3d, 0xf8, 0xa6, 0x81, 0x3e, 0xe2, 0xe3, 0x0a, 0xd6,
  655. 0x41, 0xab, 0xb8, 0xc4, 0x61, 0x42, 0x30, 0xd4, 0x5e, 0xf5, 0x33, 0x98, 0xcf, 0x43, 0xca, 0x7c,
  656. 0x87, 0x0b, 0xdf, 0xf5, 0x91, 0x29, 0x7a, 0x37, 0x4d, 0xd1, 0x28, 0x88, 0xcb, 0xbf, 0xd7, 0xc7,
  657. 0xa5, 0xf3, 0xf7, 0x1a, 0xd9, 0x4d, 0xeb, 0xf7, 0x39, 0xf3, 0xbd, 0x34, 0xf8, 0x23, 0x0f, 0xbe,
  658. 0x2e, 0x05, 0x8f, 0x56, 0x55, 0xcf, 0x47, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x17, 0x28,
  659. 0xc5, 0xb1, 0x05, 0x00, 0x00,
  660. }