1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
////  PFS Data structures (stored in etcd)

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Repo {
    #[prost(string, tag="1")]
    pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Branch {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    #[prost(string, tag="2")]
    pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BranchInfo {
    #[prost(message, optional, tag="4")]
    pub branch: ::std::option::Option<Branch>,
    #[prost(message, optional, tag="2")]
    pub head: ::std::option::Option<Commit>,
    #[prost(message, repeated, tag="3")]
    pub provenance: ::std::vec::Vec<Branch>,
    #[prost(message, repeated, tag="5")]
    pub subvenance: ::std::vec::Vec<Branch>,
    #[prost(message, repeated, tag="6")]
    pub direct_provenance: ::std::vec::Vec<Branch>,
    /// Deprecated field left for backward compatibility.
    #[prost(string, tag="1")]
    pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BranchInfos {
    #[prost(message, repeated, tag="1")]
    pub branch_info: ::std::vec::Vec<BranchInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct File {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
    #[prost(string, tag="2")]
    pub path: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
    #[prost(string, tag="1")]
    pub hash: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Object {
    #[prost(string, tag="1")]
    pub hash: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tag {
    #[prost(string, tag="1")]
    pub name: std::string::String,
}
/// RepoInfo is the main data structure representing a Repo in etcd
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepoInfo {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    #[prost(message, optional, tag="2")]
    pub created: ::std::option::Option<::prost_types::Timestamp>,
    #[prost(uint64, tag="3")]
    pub size_bytes: u64,
    #[prost(string, tag="5")]
    pub description: std::string::String,
    #[prost(message, repeated, tag="7")]
    pub branches: ::std::vec::Vec<Branch>,
    /// Set by ListRepo and InspectRepo if Pachyderm's auth system is active, but
    /// not stored in etcd. To set a user's auth scope for a repo, use the
    /// Pachyderm Auth API (in src/client/auth/auth.proto)
    #[prost(message, optional, tag="6")]
    pub auth_info: ::std::option::Option<RepoAuthInfo>,
}
/// RepoAuthInfo includes the caller's access scope for a repo, and is returned
/// by ListRepo and InspectRepo but not persisted in etcd. It's used by the
/// Pachyderm dashboard to render repo access appropriately. To set a user's auth
/// scope for a repo, use the Pachyderm Auth API (in src/client/auth/auth.proto)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepoAuthInfo {
    /// The callers access level to the relevant repo (e.g. may be OWNER even if
    /// the user isn't an OWNER of the repo, if they're an admin for the cluster)
    #[prost(enumeration="super::auth::Scope", tag="1")]
    pub access_level: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitOrigin {
    #[prost(enumeration="OriginKind", tag="1")]
    pub kind: i32,
}
/// Commit is a reference to a commit (e.g. the collection of branches and the
/// collection of currently-open commits in etcd are collections of Commit
/// protos)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Commit {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    #[prost(string, tag="2")]
    pub id: std::string::String,
}
/// CommitRange represents chain of commits with Lower being an ancestor of
/// Upper or, in the case of a range of size 1, the same commit.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitRange {
    #[prost(message, optional, tag="1")]
    pub lower: ::std::option::Option<Commit>,
    #[prost(message, optional, tag="2")]
    pub upper: ::std::option::Option<Commit>,
}
/// CommitProvenance keeps track of where (i.e. which branch) a certain commit
/// originated from. A commit's provenance consists of the commits of
/// the commits which are in its causal history.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitProvenance {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
    #[prost(message, optional, tag="2")]
    pub branch: ::std::option::Option<Branch>,
}
/// CommitInfo is the main data structure representing a commit in etcd
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitInfo {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
    #[prost(message, optional, tag="15")]
    pub branch: ::std::option::Option<Branch>,
    #[prost(message, optional, tag="17")]
    pub origin: ::std::option::Option<CommitOrigin>,
    /// description is a user-provided script describing this commit
    #[prost(string, tag="8")]
    pub description: std::string::String,
    #[prost(message, optional, tag="2")]
    pub parent_commit: ::std::option::Option<Commit>,
    #[prost(message, repeated, tag="11")]
    pub child_commits: ::std::vec::Vec<Commit>,
    #[prost(message, optional, tag="3")]
    pub started: ::std::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag="4")]
    pub finished: ::std::option::Option<::prost_types::Timestamp>,
    #[prost(uint64, tag="5")]
    pub size_bytes: u64,
    /// the commits and their original branches on which this commit is provenant
    #[prost(message, repeated, tag="16")]
    pub provenance: ::std::vec::Vec<CommitProvenance>,
    /// ReadyProvenance is the number of provenant commits which have been
    /// finished, if ReadyProvenance == len(Provenance) then the commit is ready
    /// to be processed by pps.
    #[prost(int64, tag="12")]
    pub ready_provenance: i64,
    #[prost(message, repeated, tag="9")]
    pub subvenance: ::std::vec::Vec<CommitRange>,
    /// this is the block that stores the serialized form of a tree that
    /// represents the entire file system hierarchy of the repo at this commit
    /// If this is nil, then the commit is either open (in which case 'finished'
    /// will also be nil) or is the output commit of a failed job (in which case
    /// 'finished' will have a value -- the end time of the job)
    #[prost(message, optional, tag="7")]
    pub tree: ::std::option::Option<Object>,
    #[prost(message, repeated, tag="13")]
    pub trees: ::std::vec::Vec<Object>,
    #[prost(message, optional, tag="14")]
    pub datums: ::std::option::Option<Object>,
    #[prost(int64, tag="18")]
    pub subvenant_commits_success: i64,
    #[prost(int64, tag="19")]
    pub subvenant_commits_failure: i64,
    #[prost(int64, tag="20")]
    pub subvenant_commits_total: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileInfo {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
    #[prost(enumeration="FileType", tag="2")]
    pub file_type: i32,
    #[prost(uint64, tag="3")]
    pub size_bytes: u64,
    #[prost(message, optional, tag="10")]
    pub committed: ::std::option::Option<::prost_types::Timestamp>,
    /// the base names (i.e. just the filenames, not the full paths) of
    /// the children
    #[prost(string, repeated, tag="6")]
    pub children: ::std::vec::Vec<std::string::String>,
    #[prost(message, repeated, tag="8")]
    pub objects: ::std::vec::Vec<Object>,
    #[prost(message, repeated, tag="9")]
    pub block_refs: ::std::vec::Vec<BlockRef>,
    #[prost(bytes, tag="7")]
    pub hash: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ByteRange {
    #[prost(uint64, tag="1")]
    pub lower: u64,
    #[prost(uint64, tag="2")]
    pub upper: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockRef {
    #[prost(message, optional, tag="1")]
    pub block: ::std::option::Option<Block>,
    #[prost(message, optional, tag="2")]
    pub range: ::std::option::Option<ByteRange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectInfo {
    #[prost(message, optional, tag="1")]
    pub object: ::std::option::Option<Object>,
    #[prost(message, optional, tag="2")]
    pub block_ref: ::std::option::Option<BlockRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Compaction {
    #[prost(string, repeated, tag="2")]
    pub input_prefixes: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shard {
    #[prost(message, optional, tag="1")]
    pub compaction: ::std::option::Option<Compaction>,
    #[prost(message, optional, tag="2")]
    pub range: ::std::option::Option<PathRange>,
    #[prost(string, tag="3")]
    pub output_path: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PathRange {
    #[prost(string, tag="1")]
    pub lower: std::string::String,
    #[prost(string, tag="2")]
    pub upper: std::string::String,
}
// PFS API

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRepoRequest {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    #[prost(string, tag="3")]
    pub description: std::string::String,
    #[prost(bool, tag="4")]
    pub update: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InspectRepoRequest {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRepoRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRepoResponse {
    #[prost(message, repeated, tag="1")]
    pub repo_info: ::std::vec::Vec<RepoInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRepoRequest {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    #[prost(bool, tag="2")]
    pub force: bool,
    #[prost(bool, tag="3")]
    pub all: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartCommitRequest {
    /// Parent.ID may be empty in which case the commit that Branch points to will be used as the parent.
    /// If branch is empty, or if branch does not exist, the commit will have no parent.
    #[prost(message, optional, tag="1")]
    pub parent: ::std::option::Option<Commit>,
    /// description is a user-provided string describing this commit
    #[prost(string, tag="4")]
    pub description: std::string::String,
    #[prost(string, tag="3")]
    pub branch: std::string::String,
    #[prost(message, repeated, tag="5")]
    pub provenance: ::std::vec::Vec<CommitProvenance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildCommitRequest {
    #[prost(message, optional, tag="1")]
    pub parent: ::std::option::Option<Commit>,
    #[prost(string, tag="4")]
    pub branch: std::string::String,
    #[prost(message, optional, tag="12")]
    pub origin: ::std::option::Option<CommitOrigin>,
    #[prost(message, repeated, tag="6")]
    pub provenance: ::std::vec::Vec<CommitProvenance>,
    #[prost(message, optional, tag="3")]
    pub tree: ::std::option::Option<Object>,
    #[prost(message, repeated, tag="7")]
    pub trees: ::std::vec::Vec<Object>,
    #[prost(message, optional, tag="8")]
    pub datums: ::std::option::Option<Object>,
    /// ID sets the ID of the created commit.
    #[prost(string, tag="5")]
    pub id: std::string::String,
    #[prost(uint64, tag="9")]
    pub size_bytes: u64,
    /// 'started' and 'finished' are set by Restore() when repopulating old
    /// commits. If 'finished' is set, the commit being built is always marked
    /// finished.
    #[prost(message, optional, tag="10")]
    pub started: ::std::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag="11")]
    pub finished: ::std::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinishCommitRequest {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
    /// description is a user-provided string describing this commit. Setting this
    /// will overwrite the description set in StartCommit
    #[prost(string, tag="2")]
    pub description: std::string::String,
    #[prost(message, optional, tag="3")]
    pub tree: ::std::option::Option<Object>,
    #[prost(message, repeated, tag="5")]
    pub trees: ::std::vec::Vec<Object>,
    #[prost(message, optional, tag="7")]
    pub datums: ::std::option::Option<Object>,
    #[prost(uint64, tag="6")]
    pub size_bytes: u64,
    /// If set, 'commit' will be closed (its 'finished' field will be set to the
    /// current time) but its 'tree' will be left nil.
    #[prost(bool, tag="4")]
    pub empty: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InspectCommitRequest {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
    /// BlockState causes inspect commit to block until the commit is in the desired state.
    #[prost(enumeration="CommitState", tag="2")]
    pub block_state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCommitRequest {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    #[prost(message, optional, tag="2")]
    pub from: ::std::option::Option<Commit>,
    #[prost(message, optional, tag="3")]
    pub to: ::std::option::Option<Commit>,
    #[prost(uint64, tag="4")]
    pub number: u64,
    /// Return commits oldest to newest
    #[prost(bool, tag="5")]
    pub reverse: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitInfos {
    #[prost(message, repeated, tag="1")]
    pub commit_info: ::std::vec::Vec<CommitInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBranchRequest {
    #[prost(message, optional, tag="1")]
    pub head: ::std::option::Option<Commit>,
    /// s_branch matches the field number and type of SetBranchRequest.Branch in
    /// Pachyderm 1.6--so that operations (generated by pachyderm 1.6's
    /// Admin.Export) can be deserialized by pachyderm 1.7 correctly
    #[prost(string, tag="2")]
    pub s_branch: std::string::String,
    #[prost(message, optional, tag="3")]
    pub branch: ::std::option::Option<Branch>,
    #[prost(message, repeated, tag="4")]
    pub provenance: ::std::vec::Vec<Branch>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InspectBranchRequest {
    #[prost(message, optional, tag="1")]
    pub branch: ::std::option::Option<Branch>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBranchRequest {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    /// Returns branches oldest to newest
    #[prost(bool, tag="2")]
    pub reverse: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBranchRequest {
    #[prost(message, optional, tag="1")]
    pub branch: ::std::option::Option<Branch>,
    #[prost(bool, tag="2")]
    pub force: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCommitRequest {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlushCommitRequest {
    #[prost(message, repeated, tag="1")]
    pub commits: ::std::vec::Vec<Commit>,
    #[prost(message, repeated, tag="2")]
    pub to_repos: ::std::vec::Vec<Repo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeCommitRequest {
    #[prost(message, optional, tag="1")]
    pub repo: ::std::option::Option<Repo>,
    #[prost(string, tag="2")]
    pub branch: std::string::String,
    #[prost(message, optional, tag="5")]
    pub prov: ::std::option::Option<CommitProvenance>,
    /// only commits created since this commit are returned
    #[prost(message, optional, tag="3")]
    pub from: ::std::option::Option<Commit>,
    /// Don't return commits until they're in (at least) the desired state.
    #[prost(enumeration="CommitState", tag="4")]
    pub state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFileRequest {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
    #[prost(int64, tag="2")]
    pub offset_bytes: i64,
    #[prost(int64, tag="3")]
    pub size_bytes: i64,
}
/// An OverwriteIndex specifies the index of objects from which new writes
/// are applied to.  Existing objects starting from the index are deleted.
/// We want a separate message for ObjectIndex because we want to be able to
/// distinguish between a zero index and a non-existent index.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OverwriteIndex {
    #[prost(int64, tag="1")]
    pub index: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutFileRequest {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
    #[prost(bytes, tag="3")]
    pub value: std::vec::Vec<u8>,
    #[prost(string, tag="5")]
    pub url: std::string::String,
    /// applies only to URLs that can be recursively walked, for example s3:// URLs
    #[prost(bool, tag="6")]
    pub recursive: bool,
    /// Delimiter causes data to be broken up into separate files with File.Path
    /// as a prefix.
    #[prost(enumeration="Delimiter", tag="7")]
    pub delimiter: i32,
    /// TargetFileDatums specifies the target number of datums in each written
    /// file it may be lower if data does not split evenly, but will never be
    /// higher, unless the value is 0.
    #[prost(int64, tag="8")]
    pub target_file_datums: i64,
    /// TargetFileBytes specifies the target number of bytes in each written
    /// file, files may have more or fewer bytes than the target.
    #[prost(int64, tag="9")]
    pub target_file_bytes: i64,
    /// header_records is an option for splitting data when 'delimiter' is not NONE
    /// (or SQL). It specifies the number of records that are converted to a
    /// header and applied to all file shards.
    ///
    /// This is particularly useful for CSV files, where the first row often
    /// contains column titles; if 'header_records' is set to one in that case,
    /// the first row will be associated with the directory that contains the rest
    /// of the split-up csv rows as files, and if any data is retrieved from that
    /// directory by GetFile, it will appear to begin with that first row of
    /// column labels (including in pipeline workers).
    ///
    /// Note that SQL files have their own logic for determining headers (their
    /// header is not a number of records, but a collection of SQL commands that
    /// create the relevant tables and such). This way, SQL files retrieved by
    /// GetFile can be passed to psql, and they will set up the appropriate tables
    /// before inserting the records in the files that were retrieved.
    #[prost(int64, tag="11")]
    pub header_records: i64,
    /// overwrite_index is the object index where the write starts from.  All
    /// existing objects starting from the index are deleted.
    #[prost(message, optional, tag="10")]
    pub overwrite_index: ::std::option::Option<OverwriteIndex>,
    /// delete indicates that the file should be deleted, this is redundant with
    /// DeleteFile, but is necessary because it allows you to send file deletes
    /// atomically with other PutFile operations.
    #[prost(bool, tag="12")]
    pub delete: bool,
}
/// PutFileRecord is used to record PutFile requests in etcd temporarily.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutFileRecord {
    #[prost(int64, tag="1")]
    pub size_bytes: i64,
    #[prost(string, tag="2")]
    pub object_hash: std::string::String,
    #[prost(message, optional, tag="3")]
    pub overwrite_index: ::std::option::Option<OverwriteIndex>,
    #[prost(message, optional, tag="4")]
    pub block_ref: ::std::option::Option<BlockRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutFileRecords {
    #[prost(bool, tag="1")]
    pub split: bool,
    #[prost(message, repeated, tag="2")]
    pub records: ::std::vec::Vec<PutFileRecord>,
    #[prost(bool, tag="3")]
    pub tombstone: bool,
    #[prost(message, optional, tag="4")]
    pub header: ::std::option::Option<PutFileRecord>,
    #[prost(message, optional, tag="5")]
    pub footer: ::std::option::Option<PutFileRecord>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CopyFileRequest {
    #[prost(message, optional, tag="1")]
    pub src: ::std::option::Option<File>,
    #[prost(message, optional, tag="2")]
    pub dst: ::std::option::Option<File>,
    #[prost(bool, tag="3")]
    pub overwrite: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InspectFileRequest {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFileRequest {
    /// File is the parent directory of the files we want to list. This sets the
    /// repo, the commit/branch, and path prefix of files we're interested in
    /// If the "path" field is omitted, a list of files at the top level of the repo
    /// is returned
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
    /// Full indicates whether the result should include file contents, which may
    /// be large (i.e. the list of children for directories, and the list of object
    /// references for regular files)
    #[prost(bool, tag="2")]
    pub full: bool,
    /// History indicates how many historical versions you want returned. Its
    /// semantics are:
    /// 0: Return the files as they are at the commit in `file`. FileInfo.File
    ///    will equal File in this request.
    /// 1: Return the files as they are in the last commit they were modified in.
    ///    (This will have the same hash as if you'd passed 0, but
    ///    FileInfo.File.Commit will be different.
    /// 2: Return the above and the files as they are in the next-last commit they
    ///    were modified in.
    /// 3: etc.
    ///-1: Return all historical versions.
    #[prost(int64, tag="3")]
    pub history: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WalkFileRequest {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GlobFileRequest {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
    #[prost(string, tag="2")]
    pub pattern: std::string::String,
}
/// FileInfos is the result of both ListFile and GlobFile
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileInfos {
    #[prost(message, repeated, tag="1")]
    pub file_info: ::std::vec::Vec<FileInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffFileRequest {
    #[prost(message, optional, tag="1")]
    pub new_file: ::std::option::Option<File>,
    /// OldFile may be left nil in which case the same path in the parent of
    /// NewFile's commit will be used.
    #[prost(message, optional, tag="2")]
    pub old_file: ::std::option::Option<File>,
    #[prost(bool, tag="3")]
    pub shallow: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffFileResponse {
    #[prost(message, repeated, tag="1")]
    pub new_files: ::std::vec::Vec<FileInfo>,
    #[prost(message, repeated, tag="2")]
    pub old_files: ::std::vec::Vec<FileInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFileRequest {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FsckRequest {
    #[prost(bool, tag="1")]
    pub fix: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FsckResponse {
    #[prost(string, tag="1")]
    pub fix: std::string::String,
    #[prost(string, tag="2")]
    pub error: std::string::String,
}
// Messages specific to Pachyderm 2.

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileInfoV2 {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
    #[prost(string, tag="2")]
    pub hash: std::string::String,
}
// PutTar Protocol:
//   Client sends an initial request with only the commit field set.
//   For each tar stream to put:
//     If the client wants to tag the tar stream:
//       Client sends a request with the tag field set (the first batch
//       of data can be optionally sent with this request).
//     For bytes in the tar stream:
//       Client sends a request with the bytes stored in the data field.
//     Client sends a request with the EOF field set to true.
//   Client connection is closed.

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileOperationRequestV2 {
    #[prost(message, optional, tag="1")]
    pub commit: ::std::option::Option<Commit>,
    #[prost(oneof="file_operation_request_v2::Operation", tags="2, 3")]
    pub operation: ::std::option::Option<file_operation_request_v2::Operation>,
}
pub mod file_operation_request_v2 {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Operation {
        #[prost(message, tag="2")]
        PutTar(super::PutTarRequestV2),
        #[prost(message, tag="3")]
        DeleteFiles(super::DeleteFilesRequestV2),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutTarRequestV2 {
    #[prost(string, tag="1")]
    pub tag: std::string::String,
    #[prost(bytes, tag="2")]
    pub data: std::vec::Vec<u8>,
    #[prost(bool, tag="3")]
    pub eof: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFilesRequestV2 {
    #[prost(string, repeated, tag="1")]
    pub files: ::std::vec::Vec<std::string::String>,
    #[prost(string, tag="2")]
    pub tag: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTarRequestV2 {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
}
// GetTarConditional Protocol:
//   Client sends an initial request that is similar to a GetTar request.
//   For files that match the request:
//     Server sends a response with the file info for the file.
//     If the client wants to skip the file content:
//       Client sends a request with the skip field set to true.
//     Else
//       Client sends a request with the skip field set to false.
//       For file content:
//         Server sends a response with file content in the data field.
//       Server sends a response with the EOF field set to true.
//   Server connection is closed by returning from handler.

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTarConditionalRequestV2 {
    #[prost(message, optional, tag="1")]
    pub file: ::std::option::Option<File>,
    #[prost(bool, tag="2")]
    pub skip: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTarConditionalResponseV2 {
    #[prost(message, optional, tag="1")]
    pub file_info: ::std::option::Option<FileInfoV2>,
    #[prost(bytes, tag="2")]
    pub data: std::vec::Vec<u8>,
    #[prost(bool, tag="3")]
    pub eof: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutObjectRequest {
    #[prost(bytes, tag="1")]
    pub value: std::vec::Vec<u8>,
    #[prost(message, repeated, tag="2")]
    pub tags: ::std::vec::Vec<Tag>,
    #[prost(message, optional, tag="3")]
    pub block: ::std::option::Option<Block>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateObjectRequest {
    #[prost(message, optional, tag="1")]
    pub object: ::std::option::Option<Object>,
    #[prost(message, optional, tag="2")]
    pub block_ref: ::std::option::Option<BlockRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetObjectsRequest {
    #[prost(message, repeated, tag="1")]
    pub objects: ::std::vec::Vec<Object>,
    #[prost(uint64, tag="2")]
    pub offset_bytes: u64,
    /// The number of bytes requested.
    #[prost(uint64, tag="3")]
    pub size_bytes: u64,
    /// The total amount of bytes in these objects.  It's OK if it's not
    /// entirely accurate or if it's unknown (in which case it'd be set to 0).
    /// It's used primarily as a hint for cache eviction.
    #[prost(uint64, tag="4")]
    pub total_size: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutBlockRequest {
    #[prost(message, optional, tag="1")]
    pub block: ::std::option::Option<Block>,
    #[prost(bytes, tag="2")]
    pub value: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockRequest {
    #[prost(message, optional, tag="1")]
    pub block: ::std::option::Option<Block>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlocksRequest {
    #[prost(message, repeated, tag="1")]
    pub block_refs: ::std::vec::Vec<BlockRef>,
    #[prost(uint64, tag="2")]
    pub offset_bytes: u64,
    /// The number of bytes requested.
    #[prost(uint64, tag="3")]
    pub size_bytes: u64,
    /// The total amount of bytes in these blocks.  It's OK if it's not
    /// entirely accurate or if it's unknown (in which case it'd be set to 0).
    /// It's used primarily as a hint for cache eviction.
    #[prost(uint64, tag="4")]
    pub total_size: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBlockRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TagObjectRequest {
    #[prost(message, optional, tag="1")]
    pub object: ::std::option::Option<Object>,
    #[prost(message, repeated, tag="2")]
    pub tags: ::std::vec::Vec<Tag>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListObjectsRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTagsRequest {
    #[prost(string, tag="1")]
    pub prefix: std::string::String,
    #[prost(bool, tag="2")]
    pub include_object: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTagsResponse {
    #[prost(message, optional, tag="1")]
    pub tag: ::std::option::Option<Tag>,
    #[prost(message, optional, tag="2")]
    pub object: ::std::option::Option<Object>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteObjectsRequest {
    #[prost(message, repeated, tag="1")]
    pub objects: ::std::vec::Vec<Object>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteObjectsResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTagsRequest {
    #[prost(message, repeated, tag="1")]
    pub tags: ::std::vec::Vec<Tag>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTagsResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckObjectRequest {
    #[prost(message, optional, tag="1")]
    pub object: ::std::option::Option<Object>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckObjectResponse {
    #[prost(bool, tag="1")]
    pub exists: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Objects {
    #[prost(message, repeated, tag="1")]
    pub objects: ::std::vec::Vec<Object>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutObjDirectRequest {
    #[prost(string, tag="1")]
    pub obj: std::string::String,
    #[prost(bytes, tag="2")]
    pub value: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetObjDirectRequest {
    #[prost(string, tag="1")]
    pub obj: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectIndex {
    #[prost(map="string, message", tag="1")]
    pub objects: ::std::collections::HashMap<std::string::String, BlockRef>,
    #[prost(map="string, message", tag="2")]
    pub tags: ::std::collections::HashMap<std::string::String, Object>,
}
/// These are the different places where a commit may be originated from
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OriginKind {
    User = 0,
    Auto = 1,
    Fsck = 2,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FileType {
    Reserved = 0,
    File = 1,
    Dir = 2,
}
/// CommitState describes the states a commit can be in.
/// The states are increasingly specific, i.e. a commit that is FINISHED also counts as STARTED.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CommitState {
    /// The commit has been started, all commits satisfy this state.
    Started = 0,
    /// The commit has been started, and all of its provenant commits have been finished.
    Ready = 1,
    /// The commit has been finished.
    Finished = 2,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Delimiter {
    None = 0,
    Json = 1,
    Line = 2,
    Sql = 3,
    Csv = 4,
}
# [ doc = r" Generated client implementations." ] pub mod api_client { # ! [ allow ( unused_variables , dead_code , missing_docs ) ] use tonic :: codegen :: * ; pub struct ApiClient < T > { inner : tonic :: client :: Grpc < T > , } impl ApiClient < tonic :: transport :: Channel > { # [ doc = r" Attempt to create a new client by connecting to a given endpoint." ] pub async fn connect < D > ( dst : D ) -> Result < Self , tonic :: transport :: Error > where D : std :: convert :: TryInto < tonic :: transport :: Endpoint > , D :: Error : Into < StdError > , { let conn = tonic :: transport :: Endpoint :: new ( dst ) ? . connect ( ) . await ? ; Ok ( Self :: new ( conn ) ) } } impl < T > ApiClient < T > where T : tonic :: client :: GrpcService < tonic :: body :: BoxBody > , T :: ResponseBody : Body + HttpBody + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as HttpBody > :: Error : Into < StdError > + Send , { pub fn new ( inner : T ) -> Self { let inner = tonic :: client :: Grpc :: new ( inner ) ; Self { inner } } pub fn with_interceptor ( inner : T , interceptor : impl Into < tonic :: Interceptor > ) -> Self { let inner = tonic :: client :: Grpc :: with_interceptor ( inner , interceptor ) ; Self { inner } } # [ doc = " Repo rpcs" ] # [ doc = " CreateRepo creates a new repo." ] # [ doc = " An error is returned if the repo already exists." ] pub async fn create_repo ( & mut self , request : impl tonic :: IntoRequest < super :: CreateRepoRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/CreateRepo" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " InspectRepo returns info about a repo." ] pub async fn inspect_repo ( & mut self , request : impl tonic :: IntoRequest < super :: InspectRepoRequest > , ) -> Result < tonic :: Response < super :: RepoInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/InspectRepo" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " ListRepo returns info about all repos." ] pub async fn list_repo ( & mut self , request : impl tonic :: IntoRequest < super :: ListRepoRequest > , ) -> Result < tonic :: Response < super :: ListRepoResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/ListRepo" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " DeleteRepo deletes a repo." ] pub async fn delete_repo ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteRepoRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/DeleteRepo" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Commit rpcs" ] # [ doc = " StartCommit creates a new write commit from a parent commit." ] pub async fn start_commit ( & mut self , request : impl tonic :: IntoRequest < super :: StartCommitRequest > , ) -> Result < tonic :: Response < super :: Commit > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/StartCommit" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " FinishCommit turns a write commit into a read commit." ] pub async fn finish_commit ( & mut self , request : impl tonic :: IntoRequest < super :: FinishCommitRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/FinishCommit" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " InspectCommit returns the info about a commit." ] pub async fn inspect_commit ( & mut self , request : impl tonic :: IntoRequest < super :: InspectCommitRequest > , ) -> Result < tonic :: Response < super :: CommitInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/InspectCommit" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " ListCommit returns info about all commits. This is deprecated in favor of" ] # [ doc = " ListCommitStream." ] pub async fn list_commit ( & mut self , request : impl tonic :: IntoRequest < super :: ListCommitRequest > , ) -> Result < tonic :: Response < super :: CommitInfos > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/ListCommit" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " ListCommitStream is like ListCommit, but returns its results in a GRPC stream" ] pub async fn list_commit_stream ( & mut self , request : impl tonic :: IntoRequest < super :: ListCommitRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: CommitInfo >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/ListCommitStream" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " DeleteCommit deletes a commit." ] pub async fn delete_commit ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteCommitRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/DeleteCommit" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " FlushCommit waits for downstream commits to finish" ] pub async fn flush_commit ( & mut self , request : impl tonic :: IntoRequest < super :: FlushCommitRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: CommitInfo >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/FlushCommit" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " SubscribeCommit subscribes for new commits on a given branch" ] pub async fn subscribe_commit ( & mut self , request : impl tonic :: IntoRequest < super :: SubscribeCommitRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: CommitInfo >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/SubscribeCommit" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " BuildCommit builds a commit that's backed by the given tree" ] pub async fn build_commit ( & mut self , request : impl tonic :: IntoRequest < super :: BuildCommitRequest > , ) -> Result < tonic :: Response < super :: Commit > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/BuildCommit" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " CreateBranch creates a new branch" ] pub async fn create_branch ( & mut self , request : impl tonic :: IntoRequest < super :: CreateBranchRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/CreateBranch" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " InspectBranch returns info about a branch." ] pub async fn inspect_branch ( & mut self , request : impl tonic :: IntoRequest < super :: InspectBranchRequest > , ) -> Result < tonic :: Response < super :: BranchInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/InspectBranch" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " ListBranch returns info about the heads of branches." ] pub async fn list_branch ( & mut self , request : impl tonic :: IntoRequest < super :: ListBranchRequest > , ) -> Result < tonic :: Response < super :: BranchInfos > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/ListBranch" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " DeleteBranch deletes a branch; note that the commits still exist." ] pub async fn delete_branch ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteBranchRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/DeleteBranch" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " File rpcs" ] # [ doc = " PutFile writes the specified file to pfs." ] pub async fn put_file ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: PutFileRequest > ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/PutFile" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } # [ doc = " CopyFile copies the contents of one file to another." ] pub async fn copy_file ( & mut self , request : impl tonic :: IntoRequest < super :: CopyFileRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/CopyFile" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " GetFile returns a byte stream of the contents of the file." ] pub async fn get_file ( & mut self , request : impl tonic :: IntoRequest < super :: GetFileRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/GetFile" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " InspectFile returns info about a file." ] pub async fn inspect_file ( & mut self , request : impl tonic :: IntoRequest < super :: InspectFileRequest > , ) -> Result < tonic :: Response < super :: FileInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/InspectFile" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " ListFile returns info about all files. This is deprecated in favor of" ] # [ doc = " ListFileStream" ] pub async fn list_file ( & mut self , request : impl tonic :: IntoRequest < super :: ListFileRequest > , ) -> Result < tonic :: Response < super :: FileInfos > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/ListFile" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " ListFileStream is a streaming version of ListFile" ] # [ doc = " TODO(msteffen): When the dash has been updated to use ListFileStream," ] # [ doc = " replace ListFile with this RPC (https://github.com/pachyderm/dash/issues/201)" ] pub async fn list_file_stream ( & mut self , request : impl tonic :: IntoRequest < super :: ListFileRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: FileInfo >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/ListFileStream" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " WalkFile walks over all the files under a directory, including children of children." ] pub async fn walk_file ( & mut self , request : impl tonic :: IntoRequest < super :: WalkFileRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: FileInfo >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/WalkFile" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " GlobFile returns info about all files. This is deprecated in favor of" ] # [ doc = " GlobFileStream" ] pub async fn glob_file ( & mut self , request : impl tonic :: IntoRequest < super :: GlobFileRequest > , ) -> Result < tonic :: Response < super :: FileInfos > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/GlobFile" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " GlobFileStream is a streaming version of GlobFile" ] # [ doc = " TODO(msteffen): When the dash has been updated to use GlobFileStream," ] # [ doc = " replace GlobFile with this RPC (https://github.com/pachyderm/dash/issues/201)" ] pub async fn glob_file_stream ( & mut self , request : impl tonic :: IntoRequest < super :: GlobFileRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: FileInfo >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/GlobFileStream" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " DiffFile returns the differences between 2 paths at 2 commits." ] pub async fn diff_file ( & mut self , request : impl tonic :: IntoRequest < super :: DiffFileRequest > , ) -> Result < tonic :: Response < super :: DiffFileResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/DiffFile" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " DeleteFile deletes a file." ] pub async fn delete_file ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteFileRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/DeleteFile" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " DeleteAll deletes everything" ] pub async fn delete_all ( & mut self , request : impl tonic :: IntoRequest < ( ) > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/DeleteAll" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Fsck does a file system consistency check for pfs" ] pub async fn fsck ( & mut self , request : impl tonic :: IntoRequest < super :: FsckRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: FsckResponse >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/Fsck" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " RPCs specific to Pachyderm 2." ] pub async fn file_operation_v2 ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: FileOperationRequestV2 > ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/FileOperationV2" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } pub async fn get_tar_v2 ( & mut self , request : impl tonic :: IntoRequest < super :: GetTarRequestV2 > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/GetTarV2" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } # [ doc = " Refer to the GetTarConditionalRequest / GetTarConditionalResponse message definitions for the protocol." ] pub async fn get_tar_conditional_v2 ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: GetTarConditionalRequestV2 > ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: GetTarConditionalResponseV2 >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/GetTarConditionalV2" ) ; self . inner . streaming ( request . into_streaming_request ( ) , path , codec ) . await } pub async fn list_file_v2 ( & mut self , request : impl tonic :: IntoRequest < super :: ListFileRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: FileInfoV2 >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/ListFileV2" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn glob_file_v2 ( & mut self , request : impl tonic :: IntoRequest < super :: GlobFileRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: FileInfoV2 >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.API/GlobFileV2" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } } impl < T : Clone > Clone for ApiClient < T > { fn clone ( & self ) -> Self { Self { inner : self . inner . clone ( ) , } } } impl < T > std :: fmt :: Debug for ApiClient < T > { fn fmt ( & self , f : & mut std :: fmt :: Formatter < '_ > ) -> std :: fmt :: Result { write ! ( f , "ApiClient {{ ... }}" ) } } } # [ doc = r" Generated client implementations." ] pub mod object_api_client { # ! [ allow ( unused_variables , dead_code , missing_docs ) ] use tonic :: codegen :: * ; pub struct ObjectApiClient < T > { inner : tonic :: client :: Grpc < T > , } impl ObjectApiClient < tonic :: transport :: Channel > { # [ doc = r" Attempt to create a new client by connecting to a given endpoint." ] pub async fn connect < D > ( dst : D ) -> Result < Self , tonic :: transport :: Error > where D : std :: convert :: TryInto < tonic :: transport :: Endpoint > , D :: Error : Into < StdError > , { let conn = tonic :: transport :: Endpoint :: new ( dst ) ? . connect ( ) . await ? ; Ok ( Self :: new ( conn ) ) } } impl < T > ObjectApiClient < T > where T : tonic :: client :: GrpcService < tonic :: body :: BoxBody > , T :: ResponseBody : Body + HttpBody + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as HttpBody > :: Error : Into < StdError > + Send , { pub fn new ( inner : T ) -> Self { let inner = tonic :: client :: Grpc :: new ( inner ) ; Self { inner } } pub fn with_interceptor ( inner : T , interceptor : impl Into < tonic :: Interceptor > ) -> Self { let inner = tonic :: client :: Grpc :: with_interceptor ( inner , interceptor ) ; Self { inner } } pub async fn put_object ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: PutObjectRequest > ) -> Result < tonic :: Response < super :: Object > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/PutObject" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } pub async fn put_object_split ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: PutObjectRequest > ) -> Result < tonic :: Response < super :: Objects > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/PutObjectSplit" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } pub async fn put_objects ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: PutObjectRequest > ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/PutObjects" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } pub async fn create_object ( & mut self , request : impl tonic :: IntoRequest < super :: CreateObjectRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/CreateObject" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn get_object ( & mut self , request : impl tonic :: IntoRequest < super :: Object > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/GetObject" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn get_objects ( & mut self , request : impl tonic :: IntoRequest < super :: GetObjectsRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/GetObjects" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn put_block ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: PutBlockRequest > ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/PutBlock" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } pub async fn get_block ( & mut self , request : impl tonic :: IntoRequest < super :: GetBlockRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/GetBlock" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn get_blocks ( & mut self , request : impl tonic :: IntoRequest < super :: GetBlocksRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/GetBlocks" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn list_block ( & mut self , request : impl tonic :: IntoRequest < super :: ListBlockRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: Block >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/ListBlock" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn tag_object ( & mut self , request : impl tonic :: IntoRequest < super :: TagObjectRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/TagObject" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn inspect_object ( & mut self , request : impl tonic :: IntoRequest < super :: Object > , ) -> Result < tonic :: Response < super :: ObjectInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/InspectObject" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " CheckObject checks if an object exists in the blob store without" ] # [ doc = " actually reading the object." ] pub async fn check_object ( & mut self , request : impl tonic :: IntoRequest < super :: CheckObjectRequest > , ) -> Result < tonic :: Response < super :: CheckObjectResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/CheckObject" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn list_objects ( & mut self , request : impl tonic :: IntoRequest < super :: ListObjectsRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: ObjectInfo >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/ListObjects" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn delete_objects ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteObjectsRequest > , ) -> Result < tonic :: Response < super :: DeleteObjectsResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/DeleteObjects" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn get_tag ( & mut self , request : impl tonic :: IntoRequest < super :: Tag > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/GetTag" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn inspect_tag ( & mut self , request : impl tonic :: IntoRequest < super :: Tag > , ) -> Result < tonic :: Response < super :: ObjectInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/InspectTag" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn list_tags ( & mut self , request : impl tonic :: IntoRequest < super :: ListTagsRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: ListTagsResponse >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/ListTags" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn delete_tags ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteTagsRequest > , ) -> Result < tonic :: Response < super :: DeleteTagsResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/DeleteTags" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn compact ( & mut self , request : impl tonic :: IntoRequest < ( ) > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/Compact" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " PutObjDirect puts an obj directly into object store, bypassing the content" ] # [ doc = " addressing layer." ] pub async fn put_obj_direct ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: PutObjDirectRequest > ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/PutObjDirect" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } # [ doc = " GetObjDirect gets an obj directly out of object store, bypassing the" ] # [ doc = " content addressing layer." ] pub async fn get_obj_direct ( & mut self , request : impl tonic :: IntoRequest < super :: GetObjDirectRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < :: std :: vec :: Vec < u8 > >> , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/pfs.ObjectAPI/GetObjDirect" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } } impl < T : Clone > Clone for ObjectApiClient < T > { fn clone ( & self ) -> Self { Self { inner : self . inner . clone ( ) , } } } impl < T > std :: fmt :: Debug for ObjectApiClient < T > { fn fmt ( & self , f : & mut std :: fmt :: Formatter < '_ > ) -> std :: fmt :: Result { write ! ( f , "ObjectApiClient {{ ... }}" ) } } }