Debian Codegraph @

third_party/googleapis/google/storagetransfer/v1/transfer.proto

raw
1 // Copyright 2016 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.storagetransfer.v1;
18
19 import "google/api/annotations.proto";
20 import "google/protobuf/empty.proto";
21 import "google/protobuf/field_mask.proto";
22 import "google/storagetransfer/v1/transfer_types.proto";
23
24 option cc_enable_arenas = true;
25 option go_package = "google.golang.org/genproto/googleapis/storagetransfer/v1;storagetransfer";
26 option java_outer_classname = "TransferProto";
27 option java_package = "com.google.storagetransfer.v1.proto";
28
29
30 // Transfers data between between Google Cloud Storage buckets or from a data
31 // source external to Google to a Cloud Storage bucket.
32 service StorageTransferService {
33 // Returns the Google service account that is used by Storage Transfer
34 // Service to access buckets in the project where transfers
35 // run or in other projects. Each Google service account is associated
36 // with one Google Cloud Platform Console project. Users
37 // should add this service account to the Google Cloud Storage bucket
38 // ACLs to grant access to Storage Transfer Service. This service
39 // account is created and owned by Storage Transfer Service and can
40 // only be used by Storage Transfer Service.
41 rpc GetGoogleServiceAccount(GetGoogleServiceAccountRequest) returns (GoogleServiceAccount) {
42 option (google.api.http) = { get: "/v1/googleServiceAccounts/{project_id}" };
43 }
44
45 // Creates a transfer job that runs periodically.
46 rpc CreateTransferJob(CreateTransferJobRequest) returns (TransferJob) {
47 option (google.api.http) = { post: "/v1/transferJobs" body: "transfer_job" };
48 }
49
50 // Updates a transfer job. Updating a job's transfer spec does not affect
51 // transfer operations that are running already. Updating the scheduling
52 // of a job is not allowed.
53 rpc UpdateTransferJob(UpdateTransferJobRequest) returns (TransferJob) {
54 option (google.api.http) = { patch: "/v1/{job_name=transferJobs/**}" body: "*" };
55 }
56
57 // Gets a transfer job.
58 rpc GetTransferJob(GetTransferJobRequest) returns (TransferJob) {
59 option (google.api.http) = { get: "/v1/{job_name=transferJobs/**}" };
60 }
61
62 // Lists transfer jobs.
63 rpc ListTransferJobs(ListTransferJobsRequest) returns (ListTransferJobsResponse) {
64 option (google.api.http) = { get: "/v1/transferJobs" };
65 }
66
67 // Pauses a transfer operation.
68 rpc PauseTransferOperation(PauseTransferOperationRequest) returns (google.protobuf.Empty) {
69 option (google.api.http) = { post: "/v1/{name=transferOperations/**}:pause" body: "*" };
70 }
71
72 // Resumes a transfer operation that is paused.
73 rpc ResumeTransferOperation(ResumeTransferOperationRequest) returns (google.protobuf.Empty) {
74 option (google.api.http) = { post: "/v1/{name=transferOperations/**}:resume" body: "*" };
75 }
76 }
77
78 // Request passed to GetGoogleServiceAccount.
79 message GetGoogleServiceAccountRequest {
80 // The ID of the Google Cloud Platform Console project that the Google service
81 // account is associated with.
82 // Required.
83 string project_id = 1;
84 }
85
86 // Request passed to CreateTransferJob.
87 message CreateTransferJobRequest {
88 // The job to create.
89 // Required.
90 TransferJob transfer_job = 1;
91 }
92
93 // Request passed to UpdateTransferJob.
94 message UpdateTransferJobRequest {
95 // The name of job to update.
96 // Required.
97 string job_name = 1;
98
99 // The ID of the Google Cloud Platform Console project that owns the job.
100 // Required.
101 string project_id = 2;
102
103 // The job to update.
104 // Required.
105 TransferJob transfer_job = 3;
106
107 // The field mask of the fields in `transferJob` that are to be updated in
108 // this request. Fields in `transferJob` that can be updated are:
109 // `description`, `transferSpec`, and `status`. To update the `transferSpec`
110 // of the job, a complete transfer specification has to be provided. An
111 // incomplete specification which misses any required fields will be rejected
112 // with the error `INVALID_ARGUMENT`.
113 google.protobuf.FieldMask update_transfer_job_field_mask = 4;
114 }
115
116 // Request passed to GetTransferJob.
117 message GetTransferJobRequest {
118 // The job to get.
119 // Required.
120 string job_name = 1;
121
122 // The ID of the Google Cloud Platform Console project that owns the job.
123 // Required.
124 string project_id = 2;
125 }
126
127 // `project_id`, `job_names`, and `job_statuses` are query parameters that can
128 // be specified when listing transfer jobs.
129 message ListTransferJobsRequest {
130 // A list of query parameters specified as JSON text in the form of
131 // {"project_id":"my_project_id",
132 // "job_names":["jobid1","jobid2",...],
133 // "job_statuses":["status1","status2",...]}.
134 // Since `job_names` and `job_statuses` support multiple values, their values
135 // must be specified with array notation. `project_id` is required. `job_names`
136 // and `job_statuses` are optional. The valid values for `job_statuses` are
137 // case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.
138 string filter = 1;
139
140 // The list page size. The max allowed value is 256.
141 int32 page_size = 4;
142
143 // The list page token.
144 string page_token = 5;
145 }
146
147 // Response from ListTransferJobs.
148 message ListTransferJobsResponse {
149 // A list of transfer jobs.
150 repeated TransferJob transfer_jobs = 1;
151
152 // The list next page token.
153 string next_page_token = 2;
154 }
155
156 // Request passed to PauseTransferOperation.
157 message PauseTransferOperationRequest {
158 // The name of the transfer operation.
159 // Required.
160 string name = 1;
161 }
162
163 // Request passed to ResumeTransferOperation.
164 message ResumeTransferOperationRequest {
165 // The name of the transfer operation.
166 // Required.
167 string name = 1;
168 }