// Copyright 2019 Make.TV Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package tv.make.api; import "transfer/transfer.proto"; import "longrunning/operations.proto"; import "google/api/annotations.proto"; import "google/protobuf/field_mask.proto"; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; service TransferService { // Lists transfers. rpc ListTransfers (ListTransfersRequest) returns (ListTransfersResponse) { option (google.api.http) = { get: "/v1/teams/{team_id}/transfers" }; } // Gets a transfer. rpc GetTransfer (GetTransferRequest) returns (Transfer) { option (google.api.http) = { get: "/v1/teams/{team_id}/transfers/{transfer_id}" }; } // Starts a transfer. // // Start of a transfer will result in the asset being transferred. // The Transfer will be part of the LongRunningOperation metadata rpc StartTransfer (StartTransferRequest) returns (tv.make.api.LongRunningOperation) { option (google.api.http) = { post: "/v1/teams/{team_id}/transfers:start" body: "*" }; } // Gets a batch of transfers. rpc BatchGetTransfers (BatchGetTransfersRequest) returns (BatchGetTransfersResponse) { option (google.api.http) = { get: "/v1/teams/-/transfers:batchGet" }; } } // Request message for [ListTransfers][tv.make.api.TransferService.ListTransfers]. message ListTransfersRequest { // The unique identifier of the team owning the transfer. string team_id = 1; // The maximum number of items to return. int32 page_size = 2; // The next_page_token value returned from a previous List request, if any. string page_token = 3; // Specifies the result ordering for List requests. string order_by = 4; } // Response message for [ListTransfers][tv.make.api.TransferService.ListTransfers]. message ListTransfersResponse { // The list of transfers. repeated Transfer transfers = 1; // Token to retrieve the next page of results, or empty if there are no // more results in the list. string next_page_token = 2; } // Request message for [GetTransfer][tv.make.api.TransferService.GetTransfer]. message GetTransferRequest { // The unique identifier of the transfer. string transfer_id = 1; // The unique identifier of the team owning the transfer. string team_id = 2; } // Request message for [StartTransfer][tv.make.api.TransferService.StartTransfer]. message StartTransferRequest { // The unique identifier of the team owning the transfer. string team_id = 1; // The transfer to create. Transfer transfer = 2; } // Request message for [UpdateTransfer][tv.make.api.TransferService.UpdateTransfer]. message UpdateTransferRequest { // The transfer resource which replaces the resource on the server. Transfer transfer = 1; // The update mask applies to the resource. For the `FieldMask` definition, // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask google.protobuf.FieldMask update_mask = 2; } // Request message for [DeleteTransfer][tv.make.api.TransferService.DeleteTransfer]. message DeleteTransferRequest { // The unique identifier of the transfer. string transfer_id = 1; // The unique identifier of the team owning the transfer. string team_id = 2; } // Request message for [BatchGetTransfers][tv.make.api.TransferService.BatchGetTransfers]. message BatchGetTransfersRequest { // The unique identifier of the productions to retrieve. repeated string transfer_ids = 1; // The unique identifier of the teams owning the transfers. repeated string team_ids = 2; } // Response message for [BatchGetTransfers][tv.make.api.TransferService.BatchGetTransfers]. message BatchGetTransfersResponse { // The list of transfers. repeated Transfer transfers = 1; }