-
Notifications
You must be signed in to change notification settings - Fork 2
/
transfer_service.proto
93 lines (74 loc) · 3.04 KB
/
transfer_service.proto
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
/* Service to transfer data from one organization to another.
*
* To transfer data to another organization, you must have access to both organizations,
* and must have the TRANSFERS permissions in the sender organization.
*/
syntax = "proto3";
package hiber.transfer;
import "base.proto";
import "device.proto";
import "organization.proto";
import "transfer.proto";
option java_multiple_files = false;
option java_package = "global.hiber.api.grpc.transfer";
option java_outer_classname = "TransferApi";
option go_package = ".;hiber";
service TransferService {
rpc Transfer (PerformTransfer.Request) returns (PerformTransfer.Response);
rpc History (TransferHistory.Request) returns (TransferHistory.Response);
}
message PerformTransfer {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* The organization to receive the transfer. */
oneof recipient_organization_or_create {
/* Existing organization to receive the transfer.
* You must have access to the recipient organization to transfer data to it.
*/
string recipient_organization = 2;
/* Create a new organization to receive the transfer. */
organization.CreateOrganizationRequest new_organization = 3;
}
/* Optional comment for the transfer (i.e. reason, tracking information, etc). */
optional string comment = 4;
oneof type {
/* Transfer a number of selected devices to the recipient organization. */
device.DeviceSelection devices = 5;
}
}
message Response {
Transfer transfer = 1;
Request request = 2;
}
}
message TransferHistory {
message Request {
message TransferSelection {
/* Search transfers by identifier, organizations, device, etc. */
optional string search = 1;
/* Select transfers by transfer identifier. */
repeated string identifiers = 2;
/* Select transfers that were performed within this time. */
optional TimeRange time_range = 3;
oneof selection {
/* Select device transfers with specific devices. */
device.DeviceSelection devices = 6;
}
/* Only show transfer that your organization received. */
optional bool received_only = 7;
/* Only show transfer that your organization sent. */
optional bool sent_only = 8;
}
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* Select the transfers to list. Optional, when omitted or empty everything is included. */
optional TransferSelection selection = 2;
optional Pagination pagination = 3;
}
message Response {
repeated Transfer transfer_history = 1;
Request request = 2;
Pagination.Result pagination = 3;
}
}