// Copyright 2022 LTN Global Communications, 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; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; import "input/source/inputsource.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; service InputSourceService { // Lists the sources. Returns an empty list if nothing was found. rpc ListInputSources (ListInputSourcesRequest) returns (ListInputSourcesReply) { option (google.api.http) = {get: "/v1/teams/{team_id}/inputs/*/sources"}; } // Gets a source. Returns NOT_FOUND if no such source exists. rpc GetInputSource (GetInputSourceRequest) returns (InputSource) { option (google.api.http) = {get: "/v1/teams/{team_id}/inputs/{input_id}/sources/{source_id}"}; } // Creates a source. rpc CreateInputSource (CreateInputSourceRequest) returns (InputSource) { option (google.api.http) = { post: "/v1/teams/{team_id}/inputs/{source.input_id}/sources" body: "source" }; } // Updates a source. Returns NOT_FOUND if no such source exists. rpc UpdateInputSource (UpdateInputSourceRequest) returns (InputSource) { option (google.api.http) = { patch: "/v1/teams/{team_id}/inputs/{source.input_id}/sources/{source.id}" body: "source" }; } // Deletes a source. Returns NOT_FOUND if no such source exists. rpc DeleteInputSource (DeleteInputSourceRequest) returns (google.protobuf.Empty) { option (google.api.http) = {delete: "/v1/teams/{team_id}/inputs/*/sources/{source_id}"}; } // Lists all sources of all inputs in a team. rpc ListAllInputSources(ListAllInputSourcesRequest) returns (ListAllInputSourcesReply) { option (google.api.http) = {get: "/v1/teams/{team_id}/inputs/-/sources:listAll"}; } } // Request message for [ListInputSources][tv.make.api.InputSourceService.ListInputSources]. message ListInputSourcesRequest { // The unique identifier of the team owning the sources. 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; // Specifies an input to search for specific input sources. string input_id = 5; } // Reply message for [ListInputSources][tv.make.api.InputSourceService.ListInputSources]. message ListInputSourcesReply { // The list of sources. repeated InputSource sources = 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 [GetInputSource][tv.make.api.InputSourceService.GetInputSource]. message GetInputSourceRequest { // The unique identifier of the team owning the outputs. string team_id = 1; // The unique identifier of the input. string input_id = 2; // The unique identifier of the source. string source_id = 3; } // Request message for [CreateInputSource][tv.make.api.InputSourceService.CreateInputSource]. message CreateInputSourceRequest { // The unique identifier of the team owning the outputs. string team_id = 1; // The source to be created InputSource source = 2; // The unique id of the request. string request_id = 3; } // Request message for [UpdateInputSource][tv.make.api.InputSourceService.UpdateInputSource]. message UpdateInputSourceRequest { // The unique identifier of the team owning the outputs. string team_id = 1; // The source to be updated InputSource source = 2; // The unique id of the request. string request_id = 3; // 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 = 4; } // Request message for [DeleteInputSource][tv.make.api.InputSourceService.DeleteInputSource]. message DeleteInputSourceRequest { // The unique identifier of the team owning the outputs. string team_id = 1; // The unique identifier of the input. string input_id = 2; // The unique identifier of the source. string source_id = 3; } // Request message for [ListAllInputSources][tv.make.api.InputSourceService.ListAllInputSources]. message ListAllInputSourcesRequest { // The unique identifier of the team owning the sources. 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; } // Reply message for [ListAllInputSources][tv.make.api.InputSourceService.ListAllInputSources]. message ListAllInputSourcesReply { // The list of sources. repeated InputSource sources = 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; }